Extract parameter types from string literal types with TypeScript
Parse and derive types from string literal types in TypeScript using the Template Literal Types, turning `'/purchase/[shopid]/[itemid]/args/[...args]'` into `{ shopid: number, itemid: number, args: string[] }`
typescripttemplate literal typeconditional type