From 9eb83c80e19fa8d2c8c5fa0666ea38f6ecf6aaa0 Mon Sep 17 00:00:00 2001 From: MantasEdine Date: Tue, 18 Aug 2026 16:18:50 +0100 Subject: [PATCH 1/2] Fix syntax error in AsyncDisposable example --- .../documentation/copy/en/reference/Variable Declarations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/copy/en/reference/Variable Declarations.md b/packages/documentation/copy/en/reference/Variable Declarations.md index 0365f9f1f081..358c85351599 100644 --- a/packages/documentation/copy/en/reference/Variable Declarations.md +++ b/packages/documentation/copy/en/reference/Variable Declarations.md @@ -867,7 +867,7 @@ class DatabaseTransaction implements AsyncDisposable { async [Symbol.asyncDispose]() { if (this.db) { - const db = this.db: + const db = this.db; this.db = undefined; if (this.success) { await db.execAsync("COMMIT TRANSACTION"); From f9d00efdaab53f6c3e96bb973c04b8c4c6c86f20 Mon Sep 17 00:00:00 2001 From: MantasEdine Date: Tue, 18 Aug 2026 16:42:15 +0100 Subject: [PATCH 2/2] Use await using for async-disposable resource --- .../documentation/copy/en/reference/Variable Declarations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/copy/en/reference/Variable Declarations.md b/packages/documentation/copy/en/reference/Variable Declarations.md index 358c85351599..034e08756806 100644 --- a/packages/documentation/copy/en/reference/Variable Declarations.md +++ b/packages/documentation/copy/en/reference/Variable Declarations.md @@ -880,7 +880,7 @@ class DatabaseTransaction implements AsyncDisposable { } async function transfer(db: Database, account1: Account, account2: Account, amount: number) { - using tx = await DatabaseTransaction.create(db); + await using tx = await DatabaseTransaction.create(db); if (await debitAccount(db, account1, amount)) { await creditAccount(db, account2, amount); }