The previous implementation of `schema.nullable()` ends up having a problem - it only works right for `schema.nullable(schema.string())`. For other types, like `schema.number()` and `schema.boolean()`, a `null` value passed in does not validate. I poked around a bit, but "it's complicated". So, went with the suggested approach of using a `schema.maybe([V, null])` validation, which works for number and boolean. Added some additional tests on the `nullable` type. |
||
---|---|---|
.. | ||
src | ||
types | ||
package.json | ||
tsconfig.json |