We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version: 2.2.1
tsconfig.json
{ "compilerOptions": { "experimentalDecorators": true, "module": "es2015", "target": "es2015" } }
Code
declare const decorator: PropertyDecorator; export default class { @decorator a = 1; }
Expected emit:
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; const default_1 = class { constructor() { this.a = 1; } } __decorate([ decorator ], default_1.prototype, "a", void 0); export default default_1;
Actual emit:
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; export default class { constructor() { this.a = 1; } } __decorate([ decorator ], default_1.prototype, "a", void 0);
As a result, a run-time error thrown 'default_1 is not defined'
'default_1 is not defined'
The text was updated successfully, but these errors were encountered:
this
rbuckton
No branches or pull requests
TypeScript Version: 2.2.1
tsconfig.json
Code
Expected emit:
Actual emit:
As a result, a run-time error thrown
'default_1 is not defined'
The text was updated successfully, but these errors were encountered: