Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bengalister
on Feb 2, 2021
|
parent
|
context
|
favorite
| on:
Bad TypeScript Habits
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.
bryzio
on Feb 3, 2021
[–]
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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: