The easiest way I know of is
declare const isMyID: unique symbol;
export type MyID = string & { [isMyID]: true }; declare const isMyID: unique symbol;
export type MyID = string & { [isMyID]: true };