-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Check if imported file is a proper external module for imported node typings #4738
Conversation
* - use top level imports\exports | ||
* - don't use tripleslash references | ||
*/ | ||
shouldBeProperExternalModule?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should be declarative. i.e. the name tells you what it is rather than telling you how it should be have. so something like
isExternalLibrary, or isExternalLibraryImport
also looks like you have build error. |
👍 |
Check if imported file is a proper external module for imported node typings
pinging @basarat and @jbrantly: FYI, this PR has changed the signature of |
Thanks for the heads up |
@vladima can you comment this issue in the API breaking changes page |
==== tests/cases/compiler/b.ts (1 errors) ==== | ||
import y = require("a"); | ||
~~~ | ||
!!! error TS2306: File 'index.d.ts' is not a module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this would be a good case of having the "Please contact the package author to update the package definition." message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point, will update the message. Thanks!
No description provided.