-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Emitted decorator metadata is different when --isolatedModules is set #8355
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
there are differences that are expected in the emit when using this flag, but it should not be functionally different. this sample looks like a bug. I can not get the different emitted code just using the snippet provided, so there is something else going on. can you share more context from this file. |
Sorry, it seems that it is a problem within gulp-typescript and not typescript itself. Nevertheless, here is a repo that can reproduce the bug: |
@mhegazy I'm confused, has the behavior of |
The output should be the same as that of transpile. if not it is a bug. |
Gulp-typescript uses transpile, and that emits |
@Andy-MS you mind if I take this bug |
OK. Here's what I was testing with:
When |
@Andy-MS That is expected. We always serialize an interface as Object. |
@rbuckton is this because interface has no value that one can refer to during run-time ? |
@ivogabe so there is some inconsistency in our emitted results for sure. I am currently investigating. Though some quick clarification, just wonder why |
Gulp-typescript has two different compile strategies. When you set |
The problem is probably that only type information of the containing file is present with |
Hi,
I'm facing an issue while compiling an Angular 2 application with the IsolatedModules flag set to true.
If IsolatedModules is set to false everything works as expect.
The emitted decorator metadata is different. Is this by design or a bug?
My problem is that my module is getting bigger by the day and using this flag I can greatly improve the CompileOnSave experience.
TypeScript Version:
1.8.7
Code
Expected behavior:
If the isolatedModules flag is set to false:
Actual behavior:
If the isolatedModules flag is set to true:
The text was updated successfully, but these errors were encountered: