'Could not find a declaration file for module '@editorjs/image'
I am using editorjs in my project and there are no typescript files in my project.
Could not find a declaration file for module '@editorjs/image'. 'node_modules/@editorjs/image/dist/bundle.js' implicitly has an 'any' type.
Try npm i --save-dev @types/editorjs__image if it exists or add a new declaration (.d.ts) file containing declare module '@editorjs/image';ts(7016)
No quick fixes are available. The typescript package is not available and when I am creating .d.ts file in the project
declare module "@editorjs/image"
but it is not referring to the editorjs/image package for the usage.
Solution 1:[1]
The problem is that the .d.ts file you've created in the project should also be listed as a part of your project in your tsconfig.json:
"include": [
"**/*.ts",
"**/*.tsx",
"global.d.ts" // << specify your file here
],
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kostiantyn Ko |
