Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
danLugo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
2 ms
·
1.
▲
by
danLugo
9y ago
So basically the same as type safety through constructor constraints and instanceof... Just a bit cleaner (maybe) If you could extend primitives in Typescript, you'd have "amount extends Number" and put the necessary constrai