Type Alias Truthy<T>

Truthy: Exclude<T, FalsyValue>

Narrows the given type parameter T to all its truthy sub-types.

Type Parameters

  • T

    The original type to narrow.

import type {Truthy} from '@augment-vir/assert';

type MyTruthy = Truthy<0 | undefined | string>; // string