@bitsinfra/fusee
    Preparing search index...

    Interface UpdateHandler<A, R>

    interface UpdateHandler<A, R> {
        handle: (arg: A) => R | Promise<R>;
        validate?: (arg: A) => string | boolean | void;
    }

    Type Parameters

    • A
    • R
    Index
    handle: (arg: A) => R | Promise<R>

    Runs once per accepted update; may run steps.

    validate?: (arg: A) => string | boolean | void

    Runs first; throw (or return a string) to refuse. A refusal records nothing.