TypeScript/tests/cases/fourslash/quickInfoOnThis4.ts
Yui 72c19ec806 Fix 7304: show correct quickinfo on "this" in type position (#8508)
* Show correct quickinfo when using this in type position

* Split quickinfo test into smaller files and add test case
2016-05-07 09:12:53 -07:00

20 lines
572 B
TypeScript

/// <reference path='fourslash.ts' />
////interface ContextualInterface {
//// m: number;
//// method(this: this, n: number);
////}
////let o: ContextualInterface = {
//// m: 12,
//// method(n) {
//// let x = this/*1*/.m;
//// }
////}
////interface ContextualInterface2 {
//// (this: void, n: number): void;
////}
////let contextualInterface2: ContextualInterface2 = function (th/*2*/is, n) { }
goTo.marker('1');
verify.quickInfoIs('this: ContextualInterface');
goTo.marker('2');
verify.quickInfoIs('(parameter) this: void');