Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
loxs
· 7y ago · 0 comments
This isn't needed any more. Modern TS enforces switch exhaustiveness out-of-the box (if you provide the proper union type, of course).
Comments
[–]
sikan
7y ago
This is not true:
https://www.typescriptlang.org/docs/handbook/advanced-types....
[–]
loxs
OP
7y ago
Yeah, I always use strict and specify return type. IMO, still counts.
[–]
city41
7y ago
Oh awesome, I didn't know that. Thanks for the heads up.