Flow: Number.isInteger should be a sufficient null check

Created on 3 Mar 2017  路  3Comments  路  Source: facebook/flow

The following code fails on flow 0.40.0:

screen shot 2017-03-03 at 11 57 02 am

The error is undefined: This type cannot be compared to number

Shouldn't Number.isInteger be a sufficient check for undefined?

refinements feature request

Most helpful comment

This is a feature being worked on

All 3 comments

This is a feature being worked on

Is this still being worked on? Are there any blockers? Can anything be done to help?

@nmn Is this being worked on and/or is there an update you can give us? My naivety is telling me this wouldn't be a terribly difficult feature to implement, but it would yield significant value to Flow users. Just my 2 cents.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Macil picture Macil  路  186Comments

MarcoPolo picture MarcoPolo  路  67Comments

STRML picture STRML  路  48Comments

Gozala picture Gozala  路  54Comments

opensrcery picture opensrcery  路  88Comments