typanion icon indicating copy to clipboard operation
typanion copied to clipboard

Weird error messages with `NaN`s

Open Ayc0 opened this issue 2 years ago • 0 comments

In the following image, we can see that typanion understands NaN as null in error message:

image

This can lead to problematic error report, but also to weird cases like:

t.isNullable(t.isString())(NaN, {errors});
// logs "Expected a string (got null)"

but null should have been understood as isNullable was used

Ayc0 avatar Aug 01 '21 12:08 Ayc0