by jasonkillian · 7y ago · 0 comments
However, if you have control over the data shape, in general, it's nicer to take advantage of discriminated unions as you'll get more automatic typesafe compiler support. If you're not familiar with the construct in TypeScript, the docs give a nice example of them[0].
[0]: https://www.typescriptlang.org/docs/handbook/advanced-types....
No comments yet.