Skip to content

The return type of connection.tranaction method should not be Promise<void>. #14656

Closed
@LvChengbin

Description

@LvChengbin

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Mongoose version

8.2.4

Node.js version

20.12.2

MongoDB server version

The latest version

Typescript version (if applicable)

5.4.3

Description

transaction(fn: (session: mongodb.ClientSession) => Promise<any>, options?: mongodb.TransactionOptions): Promise<void>;

The return type of method connection.prototype.transaction should not be Promsie<void>.

Steps to Reproduce

.

Expected Behavior

It should use the correct return type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    typescriptTypes or Types-test related issue / Pull Request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions