object-shape-tester - v5.1.6
    Preparing search index...

    Type Alias CustomSpecifier<T>

    A type representing a custom specifier.

    type CustomSpecifier<T> = {
        __vir__custom__specifier__key__do__not__use__in__actual__objects: true;
        __vir__shape__specifier__key__do__not__use__in__actual__objects: true;
        checker: (value: unknown) => value is T;
        customName: string;
        defaultValue: T;
    }

    Type Parameters

    • T
    Index

    Properties

    __vir__custom__specifier__key__do__not__use__in__actual__objects: true
    __vir__shape__specifier__key__do__not__use__in__actual__objects: true
    checker: (value: unknown) => value is T

    A function used to check if a value matches this custom shape.

    customName: string

    The name of this custom shape. This will be used in error messages.

    defaultValue: T

    The default value for this custom shape.