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

The object type is the type of all non-primitive types, what you want is the Object type instead. Yes, it's confusing, especially as there's also the {} type! This article goes over the differences:

https://blog.mariusschulz.com/2017/02/24/typescript-2-2-the-...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: