Setu-TS
    Preparing search index...

    Interface IMongoSession

    A structural subset of the driver ClientSession — the members the transaction path calls.

    0.2.0

    interface IMongoSession {
        abortTransaction(): Promise<void>;
        commitTransaction(): Promise<void>;
        endSession(): Promise<void>;
        startTransaction(options?: unknown): unknown;
    }
    Index
    • Starts the transaction on this session.

      Both the parameter and the return are deliberately unknown: the real driver declares startTransaction(options?: TransactionOptions): void, whose option interface is not assignable to Record<string, unknown> and whose void return is not assignable to Promise<void>, so the typed forms made the real ClientSession fail this structural subset (X47-1). The adapter calls it with no arguments and discards the result (mongo-adapter.ts), and a fake returning Promise<void> still satisfies the widened member.

      Parameters

      • Optionaloptions: unknown

        Transaction options (the adapter passes none)

      Returns unknown