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
Today, if you have a parameter list like in f<T, U, V = never>(x: T, y: U, z: V): void, a type argument list like in f<string, boolean>("", true, 100) will infer never for V and cause an error.
Argument of type '100' is not assignable to parameter of type 'never'.
This would technically be a breaking change.
But might be hard to actually encounter.
Though, type parameter defaults with any might be a case.
So idea: always do inference, and maybe do an optimization when all type parameters are "fixed".
Partial generic type arguments
#10571
f<T, U, V = never>(x: T, y: U, z: V): void, a type argument list like inf<string, boolean>("", true, 100)will inferneverforVand cause an error.Argument of type '100' is not assignable to parameter of type 'never'.anymight be a case.#19205
<Data, Computed, Methods, PropNames>Props, but it comes last.Conclusions
Extracting returned/constructed types
#6606
#20350
typeof?const x: typeof x?