Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've really only found benefit on the return type of functions, when you can say that a type parameter satisfies a type (with the return type being a boolean). This let's you use `if (isPerson(foo))` and typescript will narrow the type appropriately in the conditional




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

Search: