Y
Hacker News
new
|
ask
|
show
|
jobs
by
chatmasta
1018 days ago
In the case of TypeScript, most of the magic and crazy hacks are dependent on Template Literal Types [0], which is what allows inference based on arbitrary strings. Once you have that abstraction, you can just keep adding complexity to it.
[0]
https://www.typescriptlang.org/docs/handbook/2/template-lite...