Re:TypeScript: Template string types and mapped type 'as' cl...
by pseudonom- on Tuesday September 01, 2020 @01:16PM
(#24344133)
This can be fairly smoothly achieved already: https://dev.to/gcanti/functional-design-smart-constructors-1...
[ Parent
| on HN ]
Re:TypeScript: Template string types and mapped type 'as' cl...
by chadlavi on Tuesday September 01, 2020 @02:49PM
(#24345355)
Yeah I'm familiar with branded types, but they're cumbersome and require API changes beyond just type narrowing to implement. I just wish they'd figure out how to implement strong types in typescript without js side effects.