Skip to content

isOptionalEmpty ​

Type guard that detects an OptionalEmpty.

Interactive example ​

Syntax ​

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

Parameters ​

  • input: Either coming from optional.

Return value ​

true if the value is undefined.

See also ​

Released under the MIT license.