swarpc - v0.19.0
    Preparing search index...

    Type Alias Hooks<Procedures>

    Declaration of hooks to run on messages received from the server

    type Hooks<Procedures extends ProceduresMap> = {
        success?: (arg: ProcedureNameAndData<Procedures, "success">) => void;
        error?: (arg: { procedure: keyof Procedures; error: Error }) => void;
        progress?: (arg: ProcedureNameAndData<Procedures, "progress">) => void;
    }

    Type Parameters

    Index

    Properties

    success?: (arg: ProcedureNameAndData<Procedures, "success">) => void

    Called when a procedure call has been successful.

    error?: (arg: { procedure: keyof Procedures; error: Error }) => void

    Called when a procedure call has failed.

    progress?: (arg: ProcedureNameAndData<Procedures, "progress">) => void

    Called when a procedure call sends progress updates.