Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

dialog and noImplicitAny #133

Closed
rapropos opened this issue Sep 5, 2017 · 2 comments
Closed

dialog and noImplicitAny #133

rapropos opened this issue Sep 5, 2017 · 2 comments

Comments

@rapropos
Copy link
Contributor

rapropos commented Sep 5, 2017

Adding the noImplicitAny compiler option for TypeScript causes the dialog component to break:

typescript: node_modules/@angular-mdc/web/dialog/dialog.component.d.ts, line: 3 
            Could not find a declaration file for module 'focus-trap'. 
            '[path-to-project]/node_modules/focus-trap/index.js' implicitly has an 'any' type. Try `npm 
            install @types/focus-trap` if it exists or add a new declaration (.d.ts) file containing `declare module 
            'focus-trap';` 

The issue is discussed here and here, so if anybody else runs across this problem, add the following to some global .d.ts file:

declare module 'focus-trap';

It would be great if we could fix this within angular-mdc itself, but nothing I have tried so far has been successful at doing that. I may also file something against focus-trap in case it can be done upstream there.

@trimox
Copy link
Owner

trimox commented Sep 6, 2017

Working on resolving. Thank you for reporting it!

@trimox
Copy link
Owner

trimox commented Sep 8, 2017

@rapropos merged! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants