facebook / facebook/flow

Support for `x instanceof Object`

Open
#2,132 7 comments 1 reaction 0 assignees View on GitHub
bug Typing: refinements
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

(This is probably related to #1690)

To check whether a certain value `x` is an object, I would like to use `x instanceof Object` because `typeof x === 'object'` ...
1. does not cover the case where x is `null`
2. does not cover functions being objects

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.