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
Lots of issues with any vs. unknown resolved; however, the signature of isValidElement needs to be fixed. That type parameter is unwitnessed and probably needs a different generic default.
Also changing (...args: any[]) => any to be the supertype of all function types.
What about (...args: never) => any or (...args: never[]) => any or (...args: any) => any
const
Type Parameters inObject.freeze
#52317
Object.freeze
is top-level immutability, but this PR implies deep immutability.Object.freeze
if they consistently use it that way.Can we remove
resolution-mode
fromimport type ... assert { }
?#49055
import type foo = require("foo")
instead?module
resolution mode within a CJS file./// <reference ...>
version of this.Improvements
#52282
Unfortunate cases where users are left with an asserted type: Type guard affects type of variable in surprising way #50916
Change to ensure that that false cases preserve the original type.
Also changes the "strict subtype relation" to ensure
any
is a strict supertype ofunknown
.any
always had a lower type ID thanunknown
, so even when they were mutual subtypes,any
always won.Does this fix Second use of type guard produces different result #52232?
any
vs.unknown
resolved; however, the signature ofisValidElement
needs to be fixed. That type parameter is unwitnessed and probably needs a different generic default.Also changing
(...args: any[]) => any
to be the supertype of all function types.(...args: never) => any
or(...args: never[]) => any
or(...args: any) => any
never
vsnever[]
(...args: never) => any
and(...args: never) => unknown
should be considered "toppy" types across functions.Have been able to remove the stripping of "freshness" in assignment expressions.
All of these changes are also good for incremental build and language service changes - because results are less surprising based on checking order.
The text was updated successfully, but these errors were encountered: