jimp icon indicating copy to clipboard operation
jimp copied to clipboard

Types not found when importing from 'jimp/es'

Open rcoundon opened this issue 1 year ago • 2 comments

Expected Behavior

Types to resolve when using the ES build

Current Behavior

The TypeScript compiler complains that it cannot find the declaration file when importing from jimp/es

Failure Information (for bugs)

 Could not find a declaration file for module 'jimp/es'.
 Try `npm i --save-dev @types/jimp` if it exists or add a new declaration (.d.ts) file containing `declare module 'jimp/es';`

import Jimp from 'jimp/es';

Steps to Reproduce

Simply add

import Jimp from 'jimp/es';
  • Jimp Version: 0.22.5
  • Operating System: MacOS 13.2.1 (22D68)
  • Node version: v16.19.0

Failure Logs

rcoundon avatar Feb 22 '23 17:02 rcoundon

@crutchcorn we could probably fix this before the TS rewrite

hipstersmoothie avatar Feb 22 '23 20:02 hipstersmoothie

Is there a workaround for this or is it just a //@ts-ignore?

KodeMunkie avatar Jan 06 '24 16:01 KodeMunkie