Skip to content

feat: support 'using' syntax and [Symbol.dispose] #886

@beorn

Description

@beorn

It would be great to be able to do:

{
   using client = postgres(...);
   // ... queries
}

and have client.end() be called automatically in [Symbol.dispose]. It's part of typescript (since 5.2) now and Stage 3 for TC39.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions