Skip to content

Commit ace383d

Browse files
author
Yui T
committed
add tests
1 parent 19d7e62 commit ace383d

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
///<reference path="fourslash.ts" />
2+
3+
//// type Ctor<AA> = new () => A/*1*/A;
4+
//// type MixinCtor<AA> = new () => AA & { constructor: MixinCtor<A/*2*/A> };
5+
//// type NestedCtor<AA> = new() => AA & (new () => AA & { constructor: NestedCtor<A/*3*/A> });
6+
//// type Method<AA> = { method(): A/*4*/A };
7+
//// type Construct<AA> = { new(): A/*5*/A };
8+
//// type Call<AA> = { (): A/*6*/A };
9+
//// type Index<AA> = {[foo: string]: A/*7*/A};
10+
//// type GenericMethod<AA> = { method<BB>(): A/*8*/A & B/*9*/B }
11+
12+
goTo.marker('1');
13+
verify.quickInfoIs('(type parameter) AA in type Ctor<AA>');
14+
goTo.marker('2');
15+
verify.quickInfoIs('(type parameter) AA in type MixinCtor<AA>');
16+
goTo.marker('3');
17+
verify.quickInfoIs('(type parameter) AA in type NestedCtor<AA>');
18+
goTo.marker('4');
19+
verify.quickInfoIs('(type parameter) AA in type Method<AA>');
20+
goTo.marker('5');
21+
verify.quickInfoIs('(type parameter) AA in type Construct<AA>');
22+
goTo.marker('6');
23+
verify.quickInfoIs('(type parameter) AA in type Call<AA>');
24+
goTo.marker('7');
25+
verify.quickInfoIs('(type parameter) AA in type Index<AA>');
26+
goTo.marker('8');
27+
verify.quickInfoIs('(type parameter) AA in type GenericMethod<AA>');
28+
goTo.marker('9');
29+
verify.quickInfoIs('(type parameter) BB in method<BB>(): AA & BB');

0 commit comments

Comments
 (0)