TypeScript/tests/baselines/reference/noImplicitThisObjectLiterals.js
2016-04-29 16:42:51 -07:00

23 lines
462 B
TypeScript

//// [noImplicitThisObjectLiterals.ts]
let o = {
d: this, // error, this: any
m() {
return this.d.length; // error, this: any
},
f: function() {
return this.d.length; // error, this: any
}
}
//// [noImplicitThisObjectLiterals.js]
var o = {
d: this,
m: function () {
return this.d.length; // error, this: any
},
f: function () {
return this.d.length; // error, this: any
}
};