TypeScript/tests/baselines/reference/decoratorOnFunctionParameter.js
Josh Goldberg 905a1fea39
Corrected parsing for decorators on 'this' parameters (#43175)
* Corrected parsing for decorators on 'this' parameters

* Moved checking to parser and added a specific test

* Remove unrelated checker.ts blank line

* Missed some baseeline updates...
2021-04-07 11:21:28 -07:00

18 lines
418 B
TypeScript

//// [decoratorOnFunctionParameter.ts]
declare const dec: any;
class C { n = true; }
function direct(@dec this: C) { return this.n; }
function called(@dec() this: C) { return this.n; }
//// [decoratorOnFunctionParameter.js]
var C = /** @class */ (function () {
function C() {
this.n = true;
}
return C;
}());
function direct() { return this.n; }
function called() { return this.n; }