isguard-ts
    Preparing search index...

    Type Alias TypeTypeGuard<T>

    TypeTypeGuard: TypeGuard<T> & {
        template: TypeGuardTemplate<T>;
        omit<const K extends readonly (keyof T)[]>(
            ...keys: K,
        ): TypeTypeGuard<Omit<T, K[number]>>;
        partial(): TypeTypeGuard<Partial<T>>;
        pick<const K extends readonly (keyof T)[]>(
            ...keys: K,
        ): TypeTypeGuard<Pick<T, K[number]>>;
    }

    A TypeGuard for object types. Provides additional methods for manipulating the type structure.

    Returned by isType.

    Type Parameters

    • T extends object

      The object type to guard

    Type Declaration

    • template: TypeGuardTemplate<T>

      The template used to create this type guard

    • omit: function
      • Creates a type guard excluding specified properties from T

        Type Parameters

        • const K extends readonly (keyof T)[]

        Parameters

        • ...keys: K

        Returns TypeTypeGuard<Omit<T, K[number]>>

    • partial: function
    • pick: function
      • Creates a type guard for a subset of T's properties

        Type Parameters

        • const K extends readonly (keyof T)[]

        Parameters

        • ...keys: K

        Returns TypeTypeGuard<Pick<T, K[number]>>