diff --git a/tests/cases/fourslash/completionListInTypeParameterOfClassExpression1.ts b/tests/cases/fourslash/completionListInTypeParameterOfClassExpression1.ts index 1398b05e701..f8afcdc418c 100644 --- a/tests/cases/fourslash/completionListInTypeParameterOfClassExpression1.ts +++ b/tests/cases/fourslash/completionListInTypeParameterOfClassExpression1.ts @@ -4,6 +4,7 @@ ////var C1 = class D {} ////var C3 = class D{} +////var C5 = class D{} goTo.marker("0"); verify.completionListIsEmpty(); @@ -12,4 +13,6 @@ verify.completionListIsEmpty(); goTo.marker("2"); verify.completionListIsEmpty(); goTo.marker("3"); -verify.completionListIsEmpty(); \ No newline at end of file +verify.completionListIsEmpty(); +goTo.marker("4"); +verify.not.completionListIsEmpty(); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListInTypeParameterOfTypeAlias2.ts b/tests/cases/fourslash/completionListInTypeParameterOfTypeAlias2.ts index e804fb8946a..80a910da798 100644 --- a/tests/cases/fourslash/completionListInTypeParameterOfTypeAlias2.ts +++ b/tests/cases/fourslash/completionListInTypeParameterOfTypeAlias2.ts @@ -10,11 +10,9 @@ verify.completionListIsEmpty(); goTo.marker("1"); verify.completionListContains("V"); goTo.marker("2"); -verify.not.completionListIsEmpty(); verify.completionListContains("K"); verify.completionListContains("V"); goTo.marker("3"); -verify.not.completionListIsEmpty(); verify.not.completionListContains("K"); verify.not.completionListContains("V"); verify.completionListContains("K1"); diff --git a/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts index 1bec6868e95..b6a10e086c2 100644 --- a/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts +++ b/tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts @@ -1,13 +1,22 @@ /// ////type /*0*/List = /*2*/T[] +////type /*3*/List2 = /*5*/T[]; + +type List2 = T[]; type L = T[] let typeAliashDisplayParts = [{ text: "type", kind: "keyword" }, { text: " ", kind: "space" }, { text: "List", kind: "aliasName" }, { text: "<", kind: "punctuation" }, { text: "T", kind: "typeParameterName" }, { text: ">", kind: "punctuation" }]; + +let typeAliashDisplayParts2 = [{ text: "type", kind: "keyword" }, { text: " ", kind: "space" }, { text: "List2", kind: "aliasName" }, + { text: "<", kind: "punctuation" }, { text: "T", kind: "typeParameterName" }, { text: " ", kind: "space" }, { text: "extends", kind: "keyword" }, + { text: " ", kind: "space" }, { text: "string", kind: "keyword" }, { text: ">", kind: "punctuation" }]; + let typeParameterDisplayParts = [{ text: "(", kind: "punctuation" }, { text: "type parameter", kind: "text" }, { text: ")", kind: "punctuation" }, { text: " ", kind: "space" }, { text: "T", kind: "typeParameterName" }, { text: " ", kind: "space" }, { text: "in", kind: "keyword" }, { text: " ", kind: "space" } ] + goTo.marker('0'); verify.verifyQuickInfoDisplayParts("type", "", { start: test.markerByName("0").position, length: "List".length }, typeAliashDisplayParts.concat([{ text: " ", kind: "space" }, { text: "=", kind: "operator" }, { "text": " ", "kind": "space" }, { text: "T", kind: "typeParameterName" }, @@ -20,3 +29,16 @@ verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByN goTo.marker('2'); verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("2").position, length: "T".length }, typeParameterDisplayParts.concat(typeAliashDisplayParts), []); + +goTo.marker('3'); +verify.verifyQuickInfoDisplayParts("type", "", { start: test.markerByName("3").position, length: "List2".length }, + typeAliashDisplayParts2.concat([{ text: " ", kind: "space" }, { text: "=", kind: "operator" }, { "text": " ", "kind": "space" }, { text: "T", kind: "typeParameterName" }, + { text: "[", kind: "punctuation" }, { text: "]", kind: "punctuation" }]), []); + +goTo.marker('4'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("4").position, length: "T".length }, + typeParameterDisplayParts.concat(typeAliashDisplayParts2), []); + +goTo.marker('5'); +verify.verifyQuickInfoDisplayParts("type parameter", "", { start: test.markerByName("5").position, length: "T".length }, + typeParameterDisplayParts.concat(typeAliashDisplayParts2), []); \ No newline at end of file