News for hackers. Stuff that matters.
Re:Adding type safety to object IDs in TypeScript by dbattaglia on Thursday February 01, 2024 @05:24AM (#39214468)
In Scala it worked great using AnyVal wrappers around primitive types. It’s something I miss in typescript, where type aliases are more for documentation purposes on id types but don’t add much type safety. I think they trick is the type needs value semantics, which records should help with.

There are no comments on this comment yet.