Re:I Was Wrong About TypeScript
by danielearwicker on Sunday June 05, 2016 @11:57PM
(#11844553)
The example you give has been supported since day 1. Example: document.createElement("canvas") returns HTMLCanvasElement. A limited form of string literal types has always been supported specifically for overloading return types. The newer support added in 1.8 is a way more powerful generalisation.
[ Parent
| on HN ]
There are no comments on this comment yet.