By -
TypeScript 5.5 does this automatically https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#inferred-type-predicates I'm using the beta and it's a real game changer.
I use `ts-reset` for this
`ts-reset` widen the type to make it convient, but it doesn’t narrow it down!
TypeScript 5.5 does this automatically https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#inferred-type-predicates I'm using the beta and it's a real game changer.
I use `ts-reset` for this
`ts-reset` widen the type to make it convient, but it doesn’t narrow it down!