-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Since the new unknown
type was added, it makes sense to replace a lot (if not all) usage of any
in the definition files with unknown
. For example:
Array.isArray(a: unknown): a is unknown[];
JSON.parse(a: string): unknown;
However, this change will cause many errors in projects currently using the fact that the returned types are not type-checked. This means that the change could be controversial.
ajafff, sergey-shandar, JacobFischer, MidnightDesign, szagi3891 and 87 more
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript