-
Notifications
You must be signed in to change notification settings - Fork 12.8k
importHelpers option causes compiler errors #14468
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
Comments
I still see this error when use webpack with awesome-typescript-loader in case tslib resolved via webpack |
It can't find that module because your module resolution is set to the default, which doesn't look in |
Espessialy for @Andy-MS |
@Delagen Could you provide a repro for your case? Also try using |
@Andy-MS https://github.com/Delagen/typescript-issue14468 Found 2 issues which not related to webpack or any other. So it's base behavior of TS. @code-chris I mean |
Work as intended ) - expected answer |
Status on this? Workaround gives me 500+ compiler errors for other modules it cant find, so that's not really a solution. |
@davhdavh Try using |
It is given in the command line, and yet it still cannot find it... Only tslib has this problem. Other modules are not resolved either, according to traceResolution, but it doesn't give an error due to those.
|
That shows that you're using classic resolution. That is usually bad if you are using NPM, so you might want to try |
I didn't say I was using npm, although I do use it for the build setup. But for development, it is Visual Studio and for typings, I use NuGet. (Although there is no nuget package for tslib) |
@davhdavh Wherever your modules are, you may need a |
Same here. |
As I'm using
Maybe this example helps someone else to sort out the issue. |
To summarize: The problem isn't the |
TypeScript Version: 2.2.1
Environment:
The recently added compiler option "importHelpers" causes compiler errors. There are several other closed issues where this problem was described: #12724, #12775, #12. This should be fixed, in TS 2.1.5 or 2.2.x but it still occurs.
It's a simple compiler error in the CLI. In vscode (latest version 1.10.1) the "extends" keyword causes the error.
I created a small skeleton which demonstrates this bug: https://github.com/code-chris/tslib-compile-error. This was tested on a windows machine with the specs above.
Expected behavior:
There's no compilation error when "importHelpers" option is enabled.
Actual behavior:
The compilation result is runnable and correct, but there's a compilation error like this:
The text was updated successfully, but these errors were encountered: