4 ms·
> It's pretty common in style guides to never nest ternaries. In typescript, that's the only way to narrow types based on other types. It's a mess! I really wi
by Loeffelmann 4y ago
> It's pretty common in style guides to never nest ternaries. In typescript, that's the only way to narrow types based on other types. It's a mess!
I really wish there was a kind of type builder where I can use ifs and switches to build complex types. For me that would already take away a lot of the pain of maintaining and writing complex types.