isguard-ts
    Preparing search index...

    Type Alias RefineTypeGuard<T, R>

    RefineTypeGuard: TypeGuard<R> & {
        isBase: TypeGuard<T>;
        refinement: (value: T) => value is R;
    }

    A TypeGuard that refines an existing type guard with additional constraints.

    Returned by isRefine and TypeGuard.refine.

    Type Parameters

    • T

      The base type

    • R extends T

      The refined type (subset of T)

    Type Declaration

    • isBase: TypeGuard<T>

      The base type guard being refined

    • refinement: (value: T) => value is R

      The refinement function that applies additional constraints