We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3860792 commit 17b7bcbCopy full SHA for 17b7bcb
specification/_spec_utils/utils.ts
@@ -26,10 +26,16 @@ import { Stringified } from '@spec_utils/Stringified'
26
*/
27
export type NullValue = null
28
29
+/**
30
+ * `WithNullValue<T>` allows for explicit null assignments in contexts where `null` should be interpreted as an
31
+ * actual value.
32
+ */
33
+export type WithNullValue<T> = T | NullValue
34
+
35
/**
36
* Settings in Elasticsearch are values that can be reset to their default by setting them to the `null` value.
37
*
38
* @es_quirk Because of how they are implemented internally, settings are always returned as strings, even
39
* if their value has been set using a primitive type.
40
-export type Setting<T> = Stringified<T> | NullValue
41
+export type Setting<T> = WithNullValue<Stringified<T>>
0 commit comments