You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Structurally compatible, but not-the-same object literals.
2 seconds to check that array + contextual types.
Compilers-with-Unions: 30% faster! Monaco is faster too!
Using "constituent maps" when
checking assignability to a large discriminated union target.
reducing large discriminated union types that appear as contextual types.
control-flow analysing and narrowing large discriminated unions
Caches results of subtype reduction when constructing union types.
Every time you try to construct a union type from a set of types, you have to do subtype reduction. So we're now caching the resulting subtype from the input types.
Performs deduplication of structually equivalent object/array literals.
Create some sort of string representation for every literal, then deduplicate based on that.
What if you end up not being able to?
No worse-off, this is just a way to optimize ahead of time.
Uses discriminant properties to disqualify types from subtype checks in subtype reduction.
The text was updated successfully, but these errors were encountered:
Remove Enum/Number Comparability
#42472
number
is comparable with all numeric enums in some direction.0
will never be comparable with an enum likeenum E { A = 1, B = 2}
.-1 | SomeEnum
.E.A
still comparable with its literal value?enum E { A = 1 }; E.A === 1 // works
+
.Depends on how you declare your bitflag enums.
If you compute with
<<
s, then you'll continue getting a non-union numeric enum.But if you decide to write out each of your enum values...yes, you will be affected.
This is super subtle. And the fix is not obvious.
Optimized Checking for Discriminated Unions
#42556
The text was updated successfully, but these errors were encountered: