mirror of
https://github.com/elastic/kibana.git
synced 2025-04-21 08:19:33 -04:00
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 |