Closed tatchi closed 5 years ago
@tatchi AFAIK passing null
doesn't even type-checks
prismInteger.getOption(null) // Argument of type 'null' is not assignable to parameter of type 'number'
maybe a setup issue, the prismInteger
value in your link is inferred as any
instead of Prism<number, Integer>
@tatchi anyway Number.isInteger
is more standard so I'm fine with this change, thank you
Hello,
Thanks for this great library :) I was playing around with the examples I encountered something I was not expecting:
I would have expected the
null
example to give meNone
as for theundefined
one.Seems like it's because
null % 1 === 0
. I fixed it by usingNumber.isInteger
function.