let val = '123'
isNaN(val) // nah! Argument of type 'string' is not assignable to parameter of type 'number'. ts(2345)
isNaN(123) // nah! Unexpected use of 'isNaN'. (eslintno-restricted-globals)
let val = '123'
isNaN(val) // nah! Argument of type 'string' is not assignable to parameter of type 'number'. ts(2345)
isNaN(123) // nah! Unexpected use of 'isNaN'. (eslintno-restricted-globals)
then use
Number.isNaN(val) // yay!
Number.isNaN(val) // yay!
// .eslintrc.js
...
env: {
jest: true
}
...
// .eslintrc.js
...
env: {
jest: true
}
...