Please try to reproduce the issue with typescript@next. It may have already been fixed.
TypeScript Version: 3.0.0-dev.20180606 - still fails
Search terms you tried before logging this (so others can find this issue more easily)
transpileModule, 2.9.1
Code
No publicly available repro
This issue was originally raised here
https://github.com/TypeStrong/ts-loader/issues/787#issuecomment-395145357
until it was realized this was a bug with TS itself. It seems transpileModule is dropping valid, needed imports, which is creating runtime errors
Expected behavior:
Used imports will not be dropped
Actual behavior:
They're dropped
Playground Link:
Related Issues:
looks like a duplicate of https://github.com/Microsoft/TypeScript/issues/24551. should be fixed by https://github.com/Microsoft/TypeScript/pull/24591.
The fix should be in typescript@next today, and in [email protected] next week.
Can you give typescript@next a try and confirm that my analysis is correct?
thanks for confirming. [email protected] should be out next week. there are a few other issues that we are tracking as well.
I have a reproducible project where even the latest version of TypeScript available did not work. See https://github.com/TypeStrong/ts-loader/issues/787#issuecomment-395644414
here is the file text:
import { Options } from "./Options";
import { Parent } from "./Parent";
export class Child extends Parent
{
constructor (name: string)
{
super ("1", name, new Options ());
}
}
So super(new Options()) work, super("", new Options()) does not.
thanks for the repro.
@mhegazy you guys are awesome. Any idea when 2.9.2 will be out?
Original plan is to get it out Wednesday. we are still looking at one final issue. so it could be Thursday. but barring any unforeseen circumstances, it should be out this week.
thanks a ton!
Most helpful comment
Fixed by https://github.com/Microsoft/TypeScript/pull/24802