function nullableOption<T>(subValidator): (x) => x is undefined | null | T
Create a validator which allows the target to be undefined, null, or satisfy
the sub-validator.
Type parameters
| Type parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
subValidator | (p1) => p1 is T |
Returns
Function
A validator for the array type
Parameters
| Parameter | Type |
|---|---|
x | unknown |
Returns
x is undefined | null | T