nullable
Allows null while applying a strict parser when the value is present. DDataParser.nullable(inner) returns null or the output of inner.
Interactive example
Parameters
inner: parser used when the value is notnull.coalescingValue: optional, replacesnullwith a default value and narrows the output type.checkers:checkerRefineor other helpers applied onOutput<inner> | null.errorMessage: message for inputs that are neithernullnor valid forinner.
Return value
A DataParserNullable. schema.parse(data) returns DEither.success<Output | null> or DEither.error<DataParserError>. Checkers let you, for example, restrict dates to a period even when they are optional.
