Skip to content

Bug in transpileModule in ts 2.9.1 #24729

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

Closed
arackaf opened this issue Jun 6, 2018 · 10 comments
Closed

Bug in transpileModule in ts 2.9.1 #24729

arackaf opened this issue Jun 6, 2018 · 10 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@arackaf
Copy link

arackaf commented Jun 6, 2018

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

TypeStrong/ts-loader#787 (comment)

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:

@mhegazy
Copy link
Contributor

mhegazy commented Jun 6, 2018

looks like a duplicate of #24551. should be fixed by #24591.

The fix should be in typescript@next today, and in typescript@2.9.2 next week.

Can you give typescript@next a try and confirm that my analysis is correct?

@mhegazy mhegazy added the Duplicate An existing issue was already created label Jun 6, 2018
@arackaf
Copy link
Author

arackaf commented Jun 6, 2018

@mhegazy - my apologies, I said I had tested with ts@next, and I did, but I think webpack's cache-loader incorrectly served me old (wrong) results. ts@next does indeed work.

Any idea when 2.9.2 will be out? You said next week - I don't suppose there's any chance it could be sooner?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 6, 2018

thanks for confirming. typescript@2.9.2 should be out next week. there are a few other issues that we are tracking as well.

@manu-st
Copy link

manu-st commented Jun 8, 2018

I have a reproducible project where even the latest version of TypeScript available did not work. See TypeStrong/ts-loader#787 (comment)

@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2018

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 ());
   }
}

@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2018

So super(new Options()) work, super("", new Options()) does not.

thanks for the repro.

@mhegazy mhegazy removed the Duplicate An existing issue was already created label Jun 8, 2018
@mhegazy mhegazy added this to the TypeScript 2.9.2 milestone Jun 8, 2018
@mhegazy mhegazy added the Bug A bug in TypeScript label Jun 8, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Jun 11, 2018

Fixed by #24802

@mhegazy mhegazy closed this as completed Jun 11, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Jun 11, 2018
@arackaf
Copy link
Author

arackaf commented Jun 11, 2018

@mhegazy you guys are awesome. Any idea when 2.9.2 will be out?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 11, 2018

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.

@arackaf
Copy link
Author

arackaf commented Jun 11, 2018

thanks a ton!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

4 participants