`typeof mixed === 'object' && mixed` should not report sketchy-null-mixed
Open
linter
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Consider these 2 snippets:
```javascript
declare var m : ?mixed;
if (typeof m === 'object' && m) {
/*snip*/
}
if (typeof m === 'object') {
if (m) {
}
}
```
In the first case flow-lint reports a `sketchy-null-mixed` error, while in the second case it does not. I think that flow should not report an error in both cases, since the only falsy value with type === 'object' is `null`.
Contributor guide
Assessment
This issue has not been assessed yet.