deno/cli/tests/ts_decorators.ts
Bartek Iwańczuk 960f9ccb2e
fix: SWC lexer settings and silent errors (#5752)
This commit changes how error occurring in SWC are handled.
Changed lexer settings to properly handle TS decorators.
Changed output of SWC error to annotate with position in file.
2020-05-22 19:23:35 +02:00

15 lines
248 B
TypeScript

/* eslint-disable */
function Decorate() {
return function (constructor: any): any {
return class extends constructor {
protected someField: string = "asdf";
};
};
}
@Decorate()
class SomeClass {}
console.log(new SomeClass());