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
Want to be able to say when a type variable has a constraint, you want to lift that constraint up to an intersection of the type variable and its constraint.
T extends "a" | "b"
-> T & ("a" | "b")
-> T & "a" | T & "b".
Once you do that, you can narrow those intersections with x === "a" and x === "b" accordingly.
Reminds some of us of negated types.
With negated types, we had perf problems of generating a ton of types.
What about a constraint of IntrinsicElements or something?
Is this something where we could have a size limit?
Will this introduce a lot of subtype reduction?
Think most code will have no effect at all?
If we could make this efficient, could we do negated types?
That's not why we didn't do negated types.
"Yeah, but that's why I stopped bringing them up"
🤨
Do we manufacture these unions of intersection lazily?
Unclear - sounds like yes?
The text was updated successfully, but these errors were encountered:
Lazily Compute Module Shapes/APIs in
--incremental
#42960
--watch
, we generate a.tsbuildinfo
file..d.ts
emit for a file the first time.composite
, we'll still have to do the.d.ts
emit.composite
..d.ts
emit?.d.ts
is convenient.composite
flag, ideally we'd want to reuse the.d.ts
files since you're redoing all the same work.--noEmit
, the up-front benefit is great.tsc --watch
, read the news, make a change, and a re-check is not that fast.assumeChangesAffectShape
for--incremental
and--watch
scenarios#41219
.d.ts
emit enabled, you have to still pay for the cost of.d.ts
emit..d.ts
files, every change impacts your dependencies..d.ts
emit, not idealRe-relax Index Signature Requirements
#43065
SomeObject -> { [x: string]: any }
SomeObject -> { [x: string]: any, [x: number]: any }
{ [x: string]: any } & { [x: number]: any }
- kind of esoteric though.Experiments in Narrowing Generics
T extends "a" | "b"
T & ("a" | "b")
T & "a" | T & "b"
.x === "a"
andx === "b"
accordingly.IntrinsicElements
or something?The text was updated successfully, but these errors were encountered: