Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular: Could not find a declaration file for module 'name-spell-checker' #1

Closed
PHuhn opened this issue Oct 29, 2021 · 1 comment
Closed

Comments

@PHuhn
Copy link

PHuhn commented Oct 29, 2021

I am working with Angular 12. I added the package as folows:

npm --save-dev install name-spell-checker nspell

I added a class as follows:

ng g class katas/wonderland-doublets/Doublets

I changed the class as follows:

import { NameSpellChecker } from 'name-spell-checker';
//
export class Doublets {
    spellChecker = new NameSpellChecker( );
}

Error message with 'name-spell-checker' highlighed in the import statement:

Could not find a declaration file for module 'name-spell-checker'. 'c:/Dat/Nsg/L/Web/Ng/katas/node_modules/name-spell-checker/dist/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/name-spell-checker` if it exists or add a new declaration (.d.ts) file containing `declare module 'name-spell-checker';`ts(7016)

I tried the suggestion in the message but no change.

@zjffun
Copy link
Owner

zjffun commented Oct 30, 2021

Thank you. I fix this in v0.0.3. 4638592

@zjffun zjffun closed this as completed Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants