TypeScript supports template string types that lets you create string types in a specific format. Here are a few examples:
type Locale = `${string}-${string}`;
const locale: Locale = "en-US";
type Url = `https://${string}`;
const url: Url = "https://tinytip.co";
type CssCustomProp = `var(--${string})`;
const cssCustomProp: CssCustomProp = "var(--color-primary)";
type CurrencySymbol = "€" | "$" | "£" | "¥";
type AmountWithCurrency = `${CurrencySymbol} ${number}`;
const bankBalance: AmountWithCurrency = `$ 42`;