Skip to content

Commit 135e091

Browse files
author
Yui T
committed
Add more tests
1 parent ace383d commit 135e091

2 files changed

Lines changed: 26 additions & 12 deletions

File tree

tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts renamed to tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
//// type NestedCtor<AA> = new() => AA & (new () => AA & { constructor: NestedCtor<A/*3*/A> });
66
//// type Method<AA> = { method(): A/*4*/A };
77
//// 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 }
8+
119

1210
goTo.marker('1');
1311
verify.quickInfoIs('(type parameter) AA in type Ctor<AA>');
@@ -18,12 +16,4 @@ verify.quickInfoIs('(type parameter) AA in type NestedCtor<AA>');
1816
goTo.marker('4');
1917
verify.quickInfoIs('(type parameter) AA in type Method<AA>');
2018
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');
19+
verify.quickInfoIs('(type parameter) AA in type Construct<AA>');
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
//// type Call<AA> = { (): A/*1*/A };
4+
//// type Index<AA> = {[foo: string]: A/*2*/A};
5+
//// type GenericMethod<AA> = { method<BB>(): A/*3*/A & B/*4*/B }
6+
//// type Nesting<TT> = { method<UU>(): new <WW>() => T/*5*/T & U/*6*/U & W/*7*/W };
7+
8+
type Nesting<TT> = { method<UU>(): new <WW>() => TT & UU & WW }
9+
10+
goTo.marker('1');
11+
verify.quickInfoIs('(type parameter) AA in type Call<AA>');
12+
goTo.marker('2');
13+
verify.quickInfoIs('(type parameter) AA in type Index<AA>');
14+
goTo.marker('3');
15+
verify.quickInfoIs('(type parameter) AA in type GenericMethod<AA>');
16+
goTo.marker('4');
17+
verify.quickInfoIs('(type parameter) BB in method<BB>(): AA & BB');
18+
goTo.marker('5');
19+
verify.quickInfoIs('(type parameter) TT in type Nesting<TT>');
20+
goTo.marker('6');
21+
verify.quickInfoIs('(type parameter) UU in method<UU>(): new <WW>() => TT & UU & WW');
22+
goTo.marker('7');
23+
verify.quickInfoIs('(type parameter) WW in <WW>(): TT & UU & WW');
24+

0 commit comments

Comments
 (0)