-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
await using kysely = new Kysely()
support.
#1167
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
igalklebanov
added
enhancement
New feature or request
api
Related to library's API
labels
Oct 3, 2024
igalklebanov
changed the title
Oct 3, 2024
using kysely = new Kysely()
support.await using kysely = new Kysely()
support.
igalklebanov
commented
Oct 3, 2024
Comment on lines
+37
to
+46
// @ts-ignore | ||
Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for runtimes that don't yet have Symbol.asyncDispose
.
igalklebanov
force-pushed
the
ts-using
branch
from
October 19, 2024 12:17
011dccb
to
222c3cf
Compare
igalklebanov
added a commit
that referenced
this pull request
Oct 24, 2024
igalklebanov
added a commit
that referenced
this pull request
Oct 24, 2024
igalklebanov
added a commit
that referenced
this pull request
Oct 27, 2024
igalklebanov
added a commit
that referenced
this pull request
Nov 2, 2024
igalklebanov
added a commit
that referenced
this pull request
Nov 24, 2024
igalklebanov
added a commit
that referenced
this pull request
Dec 1, 2024
igalklebanov
added a commit
that referenced
this pull request
Dec 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey 👋
This PR introduces
await using db = new Kysely(...)
support. Under the hood, it calls thedestroy
function when the scope in whichusing
was used is exited.using
is part of TypeScript since version 5.2 was released in August 2023 (more than a year ago).According to
npm
stats:typescript
has 59,208,821 weekly downloads.typescript
@5.6.2 has 10,367,140 weekly downloads.typescript
@5.5.4 has 5,269,636 weekly downloads.typescript
@5.5.3 has 1,986,815 weekly downloads.typescript
@5.5.2 has 793,512 weekly downloads.typescript
@5.4.5 has 4,832,241 weekly downloads.typescript
@5.4.4 has 272,520 weekly downloads.typescript
@5.4.3 has 551,093 weekly downloads.typescript
@5.4.2 has 1,258,707 weekly downloads.typescript
@5.3.3 has 4,330,332 weekly downloads.typescript
@5.3.2 has 429,380 weekly downloads.typescript
@5.2.2 has 8,388,969 weekly downloads.total of 38,480,345 (64.99%)