@swastikbhattacharyya/next-actions - v0.3.2
    Preparing search index...

    Type Alias ActionHandler<InputSchema, Output, Context, ErrorMap>

    ActionHandler: (
        { params, context, }: {
            context: Context;
            params: z.infer<InputSchema>;
        },
    ) => Promise<ActionResult<Output, ErrorMap>>

    Function that performs the main action after all validators have succeeded.

    Type Parameters

    • InputSchema extends $ZodType

      A Zod schema used to define the shape of the action parameters. Note: The schema is not validated automatically. Use a validator like zodValidator to enforce it.

    • Output extends void | object

      The payload returned on success.

    • Context extends object

      Shared context passed from all previous validators.

    • ErrorMap extends void | object

      A map where each key is an error code, and the corresponding value is the payload associated with that specific error.

    Type declaration