News for hackers. Stuff that matters.
Re:Adding type safety to object IDs in TypeScript by Jasper_ on Tuesday January 30, 2024 @05:13PM (#39196607)
The easiest way I know of is

    declare const isMyID: unique symbol;
    export type MyID = string & { [isMyID]: true };
Re:Adding type safety to object IDs in TypeScript by bassdigit on Wednesday January 31, 2024 @03:45AM (#39201511)
nice!