Skip to content

isNullableEmpty

Type guard that detects an EitherNullableEmpty.

Interactive example

Syntax

typescript
function isNullableEmpty<
	GenericInput extends unknown
>(
  input: GenericInput
): input is Extract<GenericInput, EitherNullableEmpty>;

Parameters

  • input: Either coming from nullable.

Return value

true if the value is null.

See also

Released under the MIT license.