8000 Incorrect codegen with emitDecoratorMetadata + ES6 modules · Issue #3793 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Incorrect codegen with emitDecoratorMetadata + ES6 modules #3793
@jods4

Description

@jods4

I upgraded from the 1.5 beta to a nightly build (ntypescript 20150709...) and found this regression:

Relevant code:

import { autoinject } from 'aurelia-framework';
import { Router } from 'aurelia-router';

@autoinject()
export class X {
  constructor(r: Router) {}
}

ES5 + AMD code gen fails at runtime with "Router is not defined", relevant parts:

define(["require", "exports", "aurelia-framework", "aurelia-router"], 
  function(require, exports, aurelia_framework_1, aurelia_router_1) {
    // ...
    X = __decorate([
      __metadata('design:paramtypes', [Router])
    ], X);
});

With the skeleton, Router should be aurelia_router_1.Router.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0