From 9000e6c2b184e46db482536ba570659794f0060e Mon Sep 17 00:00:00 2001 From: rajkamal01 <77734863+rajkamal01@users.noreply.github.com> Date: Thu, 22 Oct 2026 13:35:19 +0000 Subject: [PATCH] docs: fix const reassignment in pool event examples The connect and acquire event examples declare counters with const and then increment them, which throws "TypeError: Assignment to constant variable". Changed them to let. --- packages/pg-pool/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pg-pool/README.md b/packages/pg-pool/README.md index 63b62f184..e3fd7e474 100644 --- a/packages/pg-pool/README.md +++ b/packages/pg-pool/README.md @@ -249,7 +249,7 @@ Example: const Pool = require('pg-pool') const pool = new Pool() -const count = 0 +let count = 0 pool.on('connect', (client) => { client.count = count++ @@ -278,12 +278,12 @@ This allows you to count the number of clients which have ever been acquired fro const Pool = require('pg-pool') const pool = new Pool() -const acquireCount = 0 +let acquireCount = 0 pool.on('acquire', function (client) { acquireCount++ }) -const connectCount = 0 +let connectCount = 0 pool.on('connect', function () { connectCount++ })