@metreeca/gate - v0.12.0
    Preparing search index...

    Type Alias WriteHooks

    Write hooks, as accepted by the create() and update() methods of a Driver.

    type WriteHooks = {
        decode?: (
            state: unknown,
            request: Request,
        ) => unknown | Promise<unknown>;
    }
    Index

    Properties

    Properties

    decode?: (state: unknown, request: Request) => unknown | Promise<unknown>

    Prepares the decoded JSON body of each request before it is validated, so that defaults may be filled in or values derived from the request, as when stamping the resource with its author.