-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
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
import * as ng from "angular2/core";
@ng.Decorator({
...
})
export class MyClass{
constructor(private el: ng.ElementRef) {
}
}
Expected behavior:
If the isolatedModules flag is set to false:
...
MyClass = __decorate([
ng.Directive({
selector: '[my-selector]',
}),
__metadata('design:paramtypes', [ng.ElementRef]) // <<<<<<<<<<<<<<<<<<<
], MyClass);
Actual behavior:
If the isolatedModules flag is set to true:
...
MyClass = __decorate([
ng.Directive({
selector: '[my-selector]',
}),
__metadata('design:paramtypes', [Object]) // <<<<<<<<<<<<<<<<<<<<<<<
], MyClass);
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue