editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

❓module declaration error.

Open dipankakalita opened this issue 3 years ago • 5 comments

Could not find a declaration file for module '@editorjs/Header'. 'D:/wap/ANGULAR/editorjs/node_modules/@editorjs/header/dist/bundle.js' implicitly has an 'any' type. Try npm i --save-dev @types/editorjs__header if it exists or add a new declaration (.d.ts) file containing declare module '@editorjs/Header';ts(7016)

import Header from '@editorjs/Header';

While I tried to build using ng build I found this error. How to solve this problem in angular?

dipankakalita avatar Sep 21 '22 14:09 dipankakalita

you can add @ts-ignore comment above import // @ts-ignore import Header from '@editorjs/Header';

HussamBarbour avatar Mar 15 '23 21:03 HussamBarbour

// ./types/types.d.ts
declare module "@editorjs/header"
// tsconfig.json
{
  // ...
  "typeRoots": ["./node_modules/@types", "./types"]
}

Alexnortung avatar Aug 03 '23 13:08 Alexnortung

Same problem, except for list (was able to manually install typing for the Header). I know I can ignore (or mock) it, but it would be nice to actually have that type info. Is that coming?

mrvdot avatar Sep 01 '23 21:09 mrvdot

you can add @ts-ignore comment above import // @ts-ignore import Header from '@editorjs/Header';

it worked for me thanks

hemiftw avatar Sep 03 '23 11:09 hemiftw

// ./types/types.d.ts
declare module "@editorjs/header"
// tsconfig.json
{
  // ...
  "typeRoots": ["./node_modules/@types", "./types"]
}

worked for me

190km avatar Jun 10 '24 17:06 190km