diff --git a/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts new file mode 100644 index 00000000000..7f5f6df4d5b --- /dev/null +++ b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts @@ -0,0 +1,19 @@ +/// + +//// 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 }; + + +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'); \ No newline at end of file diff --git a/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts new file mode 100644 index 00000000000..89a648470d6 --- /dev/null +++ b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts @@ -0,0 +1,22 @@ +/// + +//// type Call = { (): A/*1*/A }; +//// type Index = {[foo: string]: A/*2*/A}; +//// type GenericMethod = { method(): A/*3*/A & B/*4*/B } +//// type Nesting = { method(): new () => T/*5*/T & U/*6*/U & W/*7*/W }; + +goTo.marker('1'); +verify.quickInfoIs('(type parameter) AA in type Call'); +goTo.marker('2'); +verify.quickInfoIs('(type parameter) AA in type Index'); +goTo.marker('3'); +verify.quickInfoIs('(type parameter) AA in type GenericMethod'); +goTo.marker('4'); +verify.quickInfoIs('(type parameter) BB in method(): AA & BB'); +goTo.marker('5'); +verify.quickInfoIs('(type parameter) TT in type Nesting'); +goTo.marker('6'); +verify.quickInfoIs('(type parameter) UU in method(): new () => TT & UU & WW'); +goTo.marker('7'); +verify.quickInfoIs('(type parameter) WW in (): TT & UU & WW'); +