TypeScript/tests/cases/fourslash/javaScriptPrototype3.ts
2015-12-07 11:55:30 -08:00

21 lines
647 B
TypeScript

///<reference path="fourslash.ts" />
// Inside an inferred method body, the type of 'this' is the class type
// @allowNonTsExtensions: true
// @Filename: myMod.js
//// function myCtor(x) {
//// this.qua = 10;
//// }
//// myCtor.prototype.foo = function() { return this/**/; };
//// myCtor.prototype.bar = function() { return '' };
////
goTo.marker();
edit.insert('.');
// Check members of the function
verify.completionListContains('foo', undefined, undefined, 'property');
verify.completionListContains('bar', undefined, undefined, 'property');
verify.completionListContains('qua', undefined, undefined, 'property');