@metreeca/core - v0.9.18
    Preparing search index...

    Type Alias Guard<T>

    Guard: (value: unknown) => value is T

    A type guard function.

    Defines the signature for functions that perform runtime type checking while providing compile-time type narrowing. When the function returns true, TypeScript narrows the value to type T in subsequent code.

    Type Parameters

    • T = unknown

      The type that the guard narrows to, defaults to unknown

    Type Declaration

      • (value: unknown): value is T
      • Parameters

        • value: unknown

        Returns value is T