-
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 featureHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
the rationale is the same as for --noUnusedLocals
which in this case would be --noUselessNullChecks
(i am not proposing a new flag, the existing --strictNullChecks
flag should be used, this is for illustration only)
declare const value: number;
if (value !== null) { // <-- somehow valid, expected to be invalid, since number doesn't have null as a possible value
}
if (value !== '') { // <-- invalid as expected
}
alexrock, aluanhaddad, blakeembrey, gcnew, nippur72 and 43 morefdcds and user72356
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 featureHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosSuggestionAn idea for TypeScriptAn idea for TypeScript