Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bengalister
· 5y ago · 0 comments
According to
https://github.com/microsoft/TypeScript/wiki/Performance#pre...
using union types in your example vs interfaces like #6 is bad for compilation performance.
Comments
[–]
bryzio
5y ago
As the docs mention, the effect is only material when there's a non-trivial number of union elements. For unions containing only a handful of elements the effect is inconsequential.