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

Can't find globally defined types #58

Open
xaviergonz opened this issue Sep 21, 2018 · 0 comments
Open

Can't find globally defined types #58

xaviergonz opened this issue Sep 21, 2018 · 0 comments

Comments

@xaviergonz
Copy link

xaviergonz commented Sep 21, 2018

given a project that has as dev dependency @types/modernizr, which has a global declaration such as
declare var Modernizr: ModernizrStatic;

While tsc and vs-code pick it up fine, this plugin fails to find it:

Cannot find name 'Modernizr'.
console.log(Modernizr.hiddenscroll);

(I assume because the Modernizr module itself is not imported, which shouldn't need to)

If I add import "modernizr"; then compilation will be ok, but it will fail in runtime since that module of course doesn't exist
If I add import "@types/modernizr"; compilation will fail since type declaration "modules" cannot be imported

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

1 participant