3

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.

ash
  • 31
  • 1
  • 3

1 Answers1

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
  ],
Kostiantyn Ko
  • 2,087
  • 1
  • 18
  • 16