with null or undefined.">
Skip to content

nullishEmpty ​

Explicitly builds an Left<"nullish"> with null or undefined.

Interactive example ​

Syntax ​

typescript
function nullishEmpty<
	const GenericInput extends NullishValue = undefined
>(
  value?: GenericInput
): NullishEmpty<GenericInput>;

Parameters ​

  • input: null or undefined (optional).

Return value ​

NullishEmpty<GenericInput> allowing you to explicitly signal the absence of a value.

See also ​

Released under the MIT license.