Learn infer and extends and you will accept all the downsides being zen from the height of your highly well typed codebase. If you don't find the following compelling: type IsParameter = Part extends `[${infer ParamName}]` ? ParamName : never; type FilteredParts = Path extends `${infer PartA}/${infer PartB}` ? IsParameter | FilteredParts : IsParameter ; type ParamValue = Key extends `...${infer Anything}` ? string[]…
Did you write that blog post? Cripes, it is amazing. What a brilliant idea. Thank you to share. My brain is wired for C++ templates, and the technique makes good sense! To your last point: Why not C#? It is interesting did not mention it, as TypeScript came from Microsoft R&D (as I understand).
Why not C#? Probably because Anders Hejlsberg [2], lead architect of C# and core developer of TypeScript, wanted something different. More of a sociological, rather than technological, reason.