You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder whether this is an intended feature. Nevertheless I think it worth mentioning
Code:
With @types/underscore installed.
a.ts
exportvara=123
b.ts
import{a}from'./a'_// access the global underscore variable
tsc@2.0.2 complains that Identifier '_' must be imported from a module
If import statement is removed, everything works.
My project relies on a global underscore imported by a script tag. Indeed the build system I use(Webpack) can be configured to import underscore from global, but it requires more changes since I have used tsd to install underscore definition and that works well.
This works if I switch to underscore definition file in master branch. cc @RyanCavanaugh, any idea?
The text was updated successfully, but these errors were encountered:
The compiler throws me the same error, and not just that, the editor loses code completion for angular global variable. This wasn't happening with typings package manager.
I wonder whether this is an intended feature. Nevertheless I think it worth mentioning
Code:
With
@types/underscore
installed.a.ts
b.ts
tsc@2.0.2 complains that
Identifier '_' must be imported from a module
If import statement is removed, everything works.
My project relies on a global underscore imported by a script tag. Indeed the build system I use(Webpack) can be configured to import underscore from global, but it requires more changes since I have used
tsd
to install underscore definition and that works well.This works if I switch to underscore definition file in master branch. cc @RyanCavanaugh, any idea?
The text was updated successfully, but these errors were encountered: