Skip to content

isOptionalEmpty

Type guard that detects an EitherOptionalEmpty.

Interactive example

Syntax

typescript
function isOptionalEmpty<
	GenericInput extends unknown
>(
  input: GenericInput
): input is Extract<GenericInput, EitherOptionalEmpty>;

Parameters

  • input: Either coming from optional.

Return value

true if the value is undefined.

See also

Released under the MIT license.