File: invalidThisEmitInContextualObjectLiteral.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (27 lines) | stat: -rw-r--r-- 681 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//// [invalidThisEmitInContextualObjectLiteral.ts]
interface IDef {
	p1: (e:string) => void;
	p2: () => (n: number) => any;
}

class TestController {
	public m(def: IDef) { }
	public p = this.m({
		p1: e => { },
		p2: () => { return vvvvvvvvv => this; },
	});
}


//// [invalidThisEmitInContextualObjectLiteral.js]
var TestController = /** @class */ (function () {
    function TestController() {
        var _this = this;
        this.p = this.m({
            p1: function (e) { },
            p2: function () { return function (vvvvvvvvv) { return _this; }; }
        });
    }
    TestController.prototype.m = function (def) { };
    return TestController;
}());