TypeScript/tests/cases/fourslash/quickInfoOnThis.ts

34 lines
872 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
/// <reference path='fourslash.ts' />
////interface Restricted {
//// n: number;
////}
////function wrapper(wrapped: { (): void; }) { }
2014-07-13 01:04:16 +02:00
////class Foo {
//// n: number;
//// prop1: th/*0*/is;
2016-03-25 23:41:37 +01:00
//// public explicitThis(this: this) {
//// wrapper(
2016-03-25 23:41:37 +01:00
//// function explicitVoid(this: void) {
//// console.log(th/*1*/is);
2014-07-13 01:04:16 +02:00
//// }
//// )
//// console.log(th/*2*/is);
//// }
//// public explicitInterface(th/*3*/is: Restricted) {
//// console.log(th/*4*/is);
//// }
//// public explicitClass(th/*5*/is: Foo) {
//// console.log(th/*6*/is);
//// }
////}
2016-09-09 18:02:55 +02:00
verify.quickInfos({
0: "this",
2016-09-09 18:02:55 +02:00
1: "this: void",
2: "this: this",
3: "(parameter) this: Restricted",
4: "this: Restricted",
5: "(parameter) this: Foo",
6: "this: Foo"
});