Hacker News new | past | comments | ask | show | jobs | submit login

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: