bupkis
    Preparing search index...

    Interface AssertionSchemaSync<Parts, Impl, Slots>

    Interface for the base abstract Assertion class.

    This interface defines the contract for assertion instances, including properties for assertion parts, implementation, slots, and methods for parsing and executing assertions both synchronously and asynchronously.

    interface AssertionSchemaSync<
        Parts extends AssertionParts,
        Impl extends AssertionImplSchemaSync<Parts>,
        Slots extends AssertionSlots<Parts>,
    > {
        impl: Impl;
        id: string;
        parts: Parts;
        slots: Slots;
        execute(
            parsedValues: ParsedValues<Parts>,
            args: unknown[],
            stackStartFn: (...args: any[]) => any,
            parseResult?: ParsedResult<Parts>,
        ): void;
        parseValues<Args extends readonly unknown[]>(
            args: Args,
        ): ParsedResult<Parts>;
        toString(): string;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    impl: Impl

    The implementation function or schema for this assertion.

    id: string
    parts: Parts

    The assertion parts used to create this assertion.

    Available at runtime for introspection.

    slots: Slots

    The slots derived from assertion parts for validation.

    Methods

    • Execute the assertion implementation synchronously.

      Parameters

      • parsedValues: ParsedValues<Parts>

        Parameters for the assertion implementation

      • args: unknown[]

        Raw parameters passed to expectSync()

      • stackStartFn: (...args: any[]) => any

        Function to use as stack start for error reporting

      • OptionalparseResult: ParsedResult<Parts>

        Optional parse result containing cached validation data

      Returns void