Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
joakimbeng
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
joakimbeng
3y ago
For such problems we use the Opaque type from the nifty type-fest package. We use it for all of our id types (which are usually numbers) so we can't accidentally mix them. In your example it would be: type Age = Opaque<number,