34:15 I use the recursive object path type for ages for type hinting of translation keys. I grab the en.json as a type and get all possible leaf paths. It works with building translation keys with string concatenation as well. What I was not able to figure out yet, if there is any parameter the translation string expects and force to set those.
2:15 mapped types
6:02 template literals
10:30 never
18:30 infer
20:40 recursion
34:23 branded types
This talk is just awesome, I really didn't find something similar
This is one of the best tech talks I've ever heard
amazing presentation
this is some dark magic that i would use for 3 or 4 time in my life, but it is so cool
10:25 i think Record and Partial should have been introduced at this point. easier to recognize imo.
34:15 I use the recursive object path type for ages for type hinting of translation keys. I grab the en.json as a type and get all possible leaf paths. It works with building translation keys with string concatenation as well. What I was not able to figure out yet, if there is any parameter the translation string expects and force to set those.
Blew my mind 😮
which plugin is installed to enable this notation // ^?
It’s called vscode-twoslash-queries :)
That same syntax works on TS Playground too, by the way.
14:39 isn't it an overkill? This syntax is super complex for a simple empty string check.
KISS
This is simple to use once you define the types
44:00 brandName is not used as a value so why not just make it a type argument?