A way to mark arbitrary strings in Typescript Template Literals

So isn’t this just:

type HEX_CODE = `#${string}`;

typescript playground

Leave a Comment