From ace383d342e76866b653c5169d0ace81b3069dff Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 1 Dec 2015 18:39:02 -0800 Subject: [PATCH] add tests --- .../quickInfoForTypeParameterInTypeAlias.ts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts diff --git a/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts new file mode 100644 index 00000000000..7259a299a7b --- /dev/null +++ b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts @@ -0,0 +1,29 @@ +/// + +//// type Ctor = new () => A/*1*/A; +//// type MixinCtor = new () => AA & { constructor: MixinCtor }; +//// type NestedCtor = new() => AA & (new () => AA & { constructor: NestedCtor }); +//// type Method = { method(): A/*4*/A }; +//// type Construct = { new(): A/*5*/A }; +//// type Call = { (): A/*6*/A }; +//// type Index = {[foo: string]: A/*7*/A}; +//// type GenericMethod = { method(): A/*8*/A & B/*9*/B } + +goTo.marker('1'); +verify.quickInfoIs('(type parameter) AA in type Ctor'); +goTo.marker('2'); +verify.quickInfoIs('(type parameter) AA in type MixinCtor'); +goTo.marker('3'); +verify.quickInfoIs('(type parameter) AA in type NestedCtor'); +goTo.marker('4'); +verify.quickInfoIs('(type parameter) AA in type Method'); +goTo.marker('5'); +verify.quickInfoIs('(type parameter) AA in type Construct'); +goTo.marker('6'); +verify.quickInfoIs('(type parameter) AA in type Call'); +goTo.marker('7'); +verify.quickInfoIs('(type parameter) AA in type Index'); +goTo.marker('8'); +verify.quickInfoIs('(type parameter) AA in type GenericMethod'); +goTo.marker('9'); +verify.quickInfoIs('(type parameter) BB in method(): AA & BB'); \ No newline at end of file