Type alias Truthy<Type>

Truthy<Type>: Exclude<Type, Falsy>

Excludes all Falsy values of the given Type.

Remarks

Type to represent all values of the given Type that are not Falsy. If all types are Falsy, the result is never.

Example

Truthy<"" | "truthy">; // "truthy"

See

Falsy

Type Parameters

  • Type = unknown

    Type to exclude Falsy values from.