kibana/packages/kbn-config-schema
Patrick Mueller 19fa802697
fix schema.nullable() to support non-strings (#42891)
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.
2019-08-13 21:38:15 -04:00
..
src fix schema.nullable() to support non-strings (#42891) 2019-08-13 21:38:15 -04:00
types
package.json [ts] upgrade to 3.5.3 (#40228) 2019-07-10 12:26:23 -07:00
tsconfig.json