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
This almost works!
But there's a problem.
Because the type system doesn't know how to relate an arbitrary T to an Awaited<T> (and vice-versa).
Even if we had the "while types"/recursive conditional types, we'd have the same general problem unless we could think of a general way to handle this.
Type Operators
Not crazy about giving these things names that people've been using.
Not crazy about
Diff
Ideas
Diff
->Exclude
Filter
->Extract
inject
etc. where I don't know what any of the methods actually do."ReturnType
sticks aroundInstanceType
is the new "whatever this constructs"Example:
By the way you can do some crazy stuff.
"Recursive" Conditional Types
Start off with the way that
await
unboxes Promises to their wrapped type.Problem:
await
keeps unwrapping until it gets something that isn'tthen
-able.You kind of want this:
or this:
More awaited work
What about this?
Then we modify the definition of
Promise
to something like this:This almost works!
But there's a problem.
Because the type system doesn't know how to relate an arbitrary
T
to anAwaited<T>
(and vice-versa).Even if we had the "
while
types"/recursive conditional types, we'd have the same general problem unless we could think of a general way to handle this.Resolve JSX namespaces from their factories
#18131
JSX
not global given the next issue...Decoupling
JSX.Element
from JSX expression return types.#21699
JSX.Element
.Per-file JSX emit
#21218
The text was updated successfully, but these errors were encountered: