@metreeca/type - v0.1.1
    Preparing search index...

    Type Alias Guard<T>

    Guard: (value: unknown) => string & { _?: T }

    A function that checks if a value conforms to type T.

    Takes an unknown value, returning an empty string on success or an error message on failure.

    Type Parameters

    • T = unknown

      The guarded type