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
In the lights of #14056, the import of type defined by Classes seems to work fine from within a module (using local imports) but does not go beyond it. Therefore, where the following example works fine:
Is this an intended behavior or, should the type also be picked up? I don't see how and why using a module as a dependency should remove the initial behavior.
Thanks for the help 👍
The text was updated successfully, but these errors were encountered:
When it's from node_modules we probably aren't checking it at all, thus Action would just be a variable of type any. (You probably don't have --noImplicitAny set.)
Ideally the package A would have something on DefinitelyTyped to provide types.
You could also try increasing --maxNodeModuleJsDepth to pick up those files into the project, although that can slow build times.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
In the lights of #14056, the import of type defined by Classes seems to work fine from within a module (using local imports) but does not go beyond it. Therefore, where the following example works fine:
TypeScript Versions: 2.7.0-dev.20171102, 2.6.1
Code
module: A, file: a.js
module: A, file: b.js
Here the type is picked up correctly in
b.js
and typescript works like a charm. However, ifA
is used as an installed dependency from another module:module B, file c.js
Actual behavior:
Typescript complains with the following:
Expected behavior:
Is this an intended behavior or, should the type also be picked up? I don't see how and why using a module as a dependency should remove the initial behavior.
Thanks for the help 👍
The text was updated successfully, but these errors were encountered: