mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Add more tests
This commit is contained in:
parent
ace383d342
commit
135e091c2a
@ -5,9 +5,7 @@
|
||||
//// type NestedCtor<AA> = new() => AA & (new () => AA & { constructor: NestedCtor<A/*3*/A> });
|
||||
//// type Method<AA> = { method(): A/*4*/A };
|
||||
//// type Construct<AA> = { new(): A/*5*/A };
|
||||
//// type Call<AA> = { (): A/*6*/A };
|
||||
//// type Index<AA> = {[foo: string]: A/*7*/A};
|
||||
//// type GenericMethod<AA> = { method<BB>(): A/*8*/A & B/*9*/B }
|
||||
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('(type parameter) AA in type Ctor<AA>');
|
||||
@ -18,12 +16,4 @@ verify.quickInfoIs('(type parameter) AA in type NestedCtor<AA>');
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('(type parameter) AA in type Method<AA>');
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs('(type parameter) AA in type Construct<AA>');
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs('(type parameter) AA in type Call<AA>');
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs('(type parameter) AA in type Index<AA>');
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs('(type parameter) AA in type GenericMethod<AA>');
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs('(type parameter) BB in method<BB>(): AA & BB');
|
||||
verify.quickInfoIs('(type parameter) AA in type Construct<AA>');
|
||||
@ -0,0 +1,24 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// type Call<AA> = { (): A/*1*/A };
|
||||
//// type Index<AA> = {[foo: string]: A/*2*/A};
|
||||
//// type GenericMethod<AA> = { method<BB>(): A/*3*/A & B/*4*/B }
|
||||
//// type Nesting<TT> = { method<UU>(): new <WW>() => T/*5*/T & U/*6*/U & W/*7*/W };
|
||||
|
||||
type Nesting<TT> = { method<UU>(): new <WW>() => TT & UU & WW }
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('(type parameter) AA in type Call<AA>');
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('(type parameter) AA in type Index<AA>');
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('(type parameter) AA in type GenericMethod<AA>');
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs('(type parameter) BB in method<BB>(): AA & BB');
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs('(type parameter) TT in type Nesting<TT>');
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs('(type parameter) UU in method<UU>(): new <WW>() => TT & UU & WW');
|
||||
goTo.marker('7');
|
||||
verify.quickInfoIs('(type parameter) WW in <WW>(): TT & UU & WW');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user