@adobe/data - v0.10.30
    Preparing search index...

    Type Alias ToTransactionFunctions<T>

    ToTransactionFunctions: {
        [K in keyof T]: T[K] extends (t: infer S) => infer R
            ? R extends void | Entity ? () => R : never
            : T[K] extends (t: infer S, input: infer Input) => infer R
                ? R extends void
                | Entity
                    ? {
                        (arg: AsyncArgsProvider<Input>): Promise<R<R>>;
                        (arg: Input): R<R>;
                    }
                    : never
                : never
    }

    Converts from TransactionDeclarations to TransactionFunctions by removing the initial store argument.

    Each transaction is exposed as an overloaded function: passing a plain Input synchronously returns the transaction's R (void | Entity); passing an AsyncArgsProvider<Input> (a function returning a Promise or AsyncGenerator) defers the commit until the source resolves and returns Promise<R>. This matches the runtime behaviour of the dispatcher in create-transaction-dispatcher.ts.

    Type Parameters

    • T