Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve intersection reduction and CFA for truthy, equality, and typeof checks#49119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ahejlsberg merged 32 commits intomainfromimproveIntersectionReduction
May 27, 2022
Merged
Changes from1 commit
Commits
Show all changes
32 commits
Select commitHold shift + click to select a range
ce23b8d
Improve reduction of intersection types
ahejlsbergMay 5, 2022
ffe147e
Accept new baselines
ahejlsbergMay 5, 2022
a95de48
Merge branch 'main' into improveIntersectionReduction
ahejlsbergMay 13, 2022
29edef1
Improve CFA for truthy, equality, and typeof checks
ahejlsbergMay 15, 2022
39326d7
Accept new baselines
ahejlsbergMay 15, 2022
d0b7ec8
Remove special case for Function type
ahejlsbergMay 15, 2022
a25388d
Merge branch 'main' into improveIntersectionReduction
ahejlsbergMay 15, 2022
95c3c56
Don't reduce intersections of form {...} & object
ahejlsbergMay 15, 2022
986963c
Accept new baselines
ahejlsbergMay 15, 2022
c400181
Anything is assignable to unknown-like union
ahejlsbergMay 16, 2022
f1ebcdd
Accept new baselines
ahejlsbergMay 16, 2022
73c91fd
Tweak subtype check
ahejlsbergMay 16, 2022
722c462
Recombine unknown type from unknown-like union in more cases
ahejlsbergMay 17, 2022
5e1111a
Display union origin only if it is shorter than union itself
ahejlsbergMay 18, 2022
5c579a4
Accept new baselines
ahejlsbergMay 18, 2022
8913cf0
Add tests
ahejlsbergMay 18, 2022
dbce210
Only attach origin type when it is shorter than union itself
ahejlsbergMay 19, 2022
1913c94
Specially preserve string & {}, number & {}, bigint & {}
ahejlsbergMay 20, 2022
8c7a38b
Accept new baselines
ahejlsbergMay 20, 2022
6f18e90
Add additional tests
ahejlsbergMay 20, 2022
e70bf7c
Fix getNormalizedType and getNarrowableTypeForReference for intersect…
ahejlsbergMay 20, 2022
7a62983
Switch NonNullable<T> to use T & {}
ahejlsbergMay 20, 2022
c35cba7
Accept new baselines
ahejlsbergMay 20, 2022
a0c0929
Use NonNullable<T> in place of anonymous T & {}
ahejlsbergMay 20, 2022
eff3be3
Accept new baselines
ahejlsbergMay 20, 2022
d3eb84f
Add fourslash test
ahejlsbergMay 24, 2022
954e80a
More fourslash tests
ahejlsbergMay 24, 2022
1d9b53f
Fix getFalsyFlags handling of intersections
ahejlsbergMay 26, 2022
3815934
Accept new baselines
ahejlsbergMay 26, 2022
bfa3a90
Add constraint to compareProperties type parameter
ahejlsbergMay 26, 2022
9801667
Unconstrained type parameter not assignable to {} with strictNullChecks
ahejlsbergMay 26, 2022
51da289
Accept new baselines
ahejlsbergMay 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
More fourslash tests
  • Loading branch information
@ahejlsberg
ahejlsberg committedMay 24, 2022
commit954e80a75dfa4c09c503a8bf5a27f79e67d8650c
11 changes: 11 additions & 0 deletionstests/cases/fourslash/completionPreferredSuggestions1.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,17 @@
////v1 = "/*1*/";
////declare let v2: number & {} | 0 | 1 | 2;
////v2 = /*2*/;
////declare let v3: string & Record<never, never> | "a" | "b" | "c";
////v3 = "/*3*/";
////type LiteralUnion1<T extends U, U> = T | U & {};
////type LiteralUnion2<T extends U, U> = T | U & Record<never, never>;
////declare let v4: LiteralUnion1<"a" | "b" | "c", string>;
////v4 = "/*4*/";
////declare let v5: LiteralUnion2<"a" | "b" | "c", string>;
////v5 = "/*5*/";

verify.completions({ marker: "1", includes: ["a", "b", "c"] });
verify.completions({ marker: "2", includes: ["0", "1", "2"], isNewIdentifierLocation: true });
verify.completions({ marker: "3", includes: ["a", "b", "c"] });
verify.completions({ marker: "4", excludes: ["a", "b", "c"] });
verify.completions({ marker: "5", includes: ["a", "b", "c"] });

[8]ページ先頭

©2009-2025 Movatter.jp