diff --git a/specification/_spec_utils/utils.ts b/specification/_spec_utils/utils.ts index 4118a86dc8..d408d9d774 100644 --- a/specification/_spec_utils/utils.ts +++ b/specification/_spec_utils/utils.ts @@ -26,10 +26,16 @@ import { Stringified } from '@spec_utils/Stringified' */ export type NullValue = null +/** + * `WithNullValue` allows for explicit null assignments in contexts where `null` should be interpreted as an + * actual value. + */ +export type WithNullValue = T | NullValue + /** * Settings in Elasticsearch are values that can be reset to their default by setting them to the `null` value. * * @es_quirk Because of how they are implemented internally, settings are always returned as strings, even * if their value has been set using a primitive type. */ -export type Setting = Stringified | NullValue +export type Setting = WithNullValue>