-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(44888): omit completions in an object expression with an instant…
…iated class type (#45044)
- Loading branch information
1 parent
69b5b2b
commit 65ed412
Showing
2 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tests/cases/fourslash/completionInsideObjectLiteralExpressionWithInstantiatedClassType.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
////class C1 { | ||
//// public a: string; | ||
//// protected b: string; | ||
//// private c: string; | ||
//// | ||
//// constructor(a: string, b = "", c = "") { | ||
//// this.a = a; | ||
//// this.b = b; | ||
//// this.c = c; | ||
//// } | ||
////} | ||
////class C2 { | ||
//// public a: string; | ||
//// constructor(a: string) { | ||
//// this.a = a; | ||
//// } | ||
////} | ||
////function f1(foo: C1 | C2 | { d: number }) {} | ||
////f1({ /*1*/ }); | ||
|
||
////function f2(foo: C1 | C2) {} | ||
////f2({ /*2*/ }); | ||
//// | ||
////function f3(foo: C2) {} | ||
////f3({ /*3*/ }); | ||
|
||
verify.completions({ | ||
marker: "1", | ||
exact: ["a", "d"], | ||
}, { | ||
marker: "2", | ||
exact: ["a"] | ||
}, { | ||
marker: "3", | ||
exact: ["a"] | ||
}); |