swarpc - v0.10.0
    Preparing search index...

    Type Alias Procedure<I, P, S>

    A procedure declaration

    type Procedure<I extends Type, P extends Type, S extends Type> = {
        input: I;
        progress: P;
        success: S;
        autotransfer?: "always" | "never" | "output-only";
    }

    Type Parameters

    • I extends Type
    • P extends Type
    • S extends Type
    Index

    Properties

    input: I

    ArkType type for the input (first argument) of the procedure, when calling it from the client.

    progress: P

    ArkType type for the data as the first argument given to the onProgress callback when calling the procedure from the client.

    success: S

    ArkType type for the output (return value) of the procedure, when calling it from the client.

    autotransfer?: "always" | "never" | "output-only"

    When should the procedure automatically add ArrayBuffers and other transferable objects to the transfer list when sending messages, both from the client to the server and vice versa.

    Transferring objects can improve performance by avoiding copies of large objects, but moves them to the other context, meaning that they cannot be used in the original context after being sent.

    'output-only' by default: only transferables sent from the server to the client will be transferred.