TypeScript/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturingES6.ts

15 lines
208 B
TypeScript
Raw Normal View History

2015-01-07 20:54:22 +01:00
// @target:es6
var f1 = () => {
this.age = 10
};
var f2 = (x: string) => {
this.name = x
}
function foo(func: () => boolean){ }
foo(() => {
this.age = 100;
return true;
});