TypeScript/tests/cases/compiler/noImplicitThisBigThis.ts
Wesley Wigham cd09cbbd5e
Cache widened types (#31586)
* Cache widened types

* Fix lint
2019-05-28 13:13:46 -07:00

51 lines
899 B
TypeScript

// @declaration: true
// @noImplicitThis: true
// https://github.com/microsoft/TypeScript/issues/29902
function createObj() {
return {
func1() {
return this;
},
func2() {
return this;
},
func3() {
return this;
}
};
}
function createObjNoCrash() {
return {
func1() {
return this;
},
func2() {
return this;
},
func3() {
return this;
},
func4() {
return this;
},
func5() {
return this;
},
func6() {
return this;
},
func7() {
return this;
},
func8() {
return this;
},
func9() {
return this;
}
};
}