Skip to content

Issue with systemjs and decorators #3441

Closed
@subesokun

Description

@subesokun

Hi, I'm using TSC 1.5.3 (latest head) and I'm trying to compile following piece of code

@SomeDecorator()
export class App {
  constructor() {
  }
}
{"compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "system",
    "target": "es5"
}}

which will then produce following code

var __decorate = ...;
var __metadata = ...;
System.register([], function(exports_1) { ... };

Now this doesn't really play nice together with systemjs and it works for me only when manually moving the var __decorate and var __metadata declarations into the anonymous function function(exports_1) { ..here... }. Not sure if it's really valid to have these variable declarations outside of the System.register.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions