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 Introduce recordOf schema. Remove redundant declarations. (#26952) 2018-12-12 15:43:54 +01:00
package.json [ts] upgrade to 3.5.3 (#40228) 2019-07-10 12:26:23 -07:00
tsconfig.json [ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948) 2019-02-28 12:06:00 -08:00