You can describe possible valid inputs for a string using the string literals in the TypeScript types but I am wondering if you can do something more loose. Like describing the prefix needed on an otherwise ambiguous string
const foostring: `foo${string}` = "foobanana";
Not sure why tsc doesnt like it
Too old tsc?
Обсуждают сегодня