Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nicoburns
on Oct 12, 2021
|
parent
|
context
|
favorite
| on:
Tricks I wish I knew when I learned TypeScript
If you want to avoid a library then you can do `typeof x === "object" && !Array.isArray(x) && x !== null`. Not ideal, but you can of course turn it into a utility function.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: