-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Import simplification too aggressive for transpileOnly in super call #24620
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
This is pretty annoying since it blocks use of TS 2.9 when running with a large project with type errors / partially typed files (forcing use of transpileOnly). Any way to get this fix to a stable version faster? This is the issue causing TypeStrong/ts-node#591 Also the proposed workaround is impossible in all of my instances because of Edit: Had 4 instances of this issue in my project. Now I have four useless statements in my code. |
This also happens when using webpack. Even worse: This error is only noticed once an instance of the corresponding class is constructed at runtime, which might only happen seldom and thus not be noticed. I have many files that look like this: import config from "client/config";
class Something extends XYZ {
constructor() {
super(config.var); [...]
} I can't even find all instances of this error without it crashing my code randomly and fixing it when it does. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
TypeScript Version: 2.9.1
Search Terms: transpile-only import
Code
Expected behavior:
QueryEntity is imported in the generated JS.
Actual behavior:
QueryEntity is simplified away.
The problem is fixed just by assigning QueryEntity to a variable first:
The text was updated successfully, but these errors were encountered: