Merge pull request #5899 from Microsoft/fix4616_addtests

Add tests for quickinfo in type parameter inside type alias
This commit is contained in:
Yui
2015-12-02 14:34:05 -08:00
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
///<reference path="fourslash.ts" />
//// type Ctor<AA> = new () => A/*1*/A;
//// type MixinCtor<AA> = new () => AA & { constructor: MixinCtor<A/*2*/A> };
//// 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 };
goTo.marker('1');
verify.quickInfoIs('(type parameter) AA in type Ctor<AA>');
goTo.marker('2');
verify.quickInfoIs('(type parameter) AA in type MixinCtor<AA>');
goTo.marker('3');
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>');

View File

@@ -0,0 +1,22 @@
/// <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 };
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');