This is insane!
Just curios, are there real-world use cases for stuff like this?
Just curios, are there real-world use cases for stuff like this?
It's a very niche use-case, this is definitely more of an impressive showcase of the new Template Literal Types feature of TS :)
I've used this with a template JSON document that has an instance of all possible types in the runtime json.
Sometimes you might have to loosen the type slightly, but it works great for a quick start.