Re:Porting 30K lines of code from Flow to TypeScript
by Nimelrian on Tuesday January 15, 2019 @05:44AM
(#18910200)
Not entirely.
For example, a function which takes a property path (in the form of an array of strings) and an object as parameters and returns the value at that path inside the object still needs overloads for every single tuple length.
For example, a function which takes a property path (in the form of an array of strings) and an object as parameters and returns the value at that path inside the object still needs overloads for every single tuple length.
In this case, num is implicitly typed as number, but if the path would be longer, you'd need to add more overloads.