From ca4e6d0cf1c5d4f44d945624b5f26b382dc1d29c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 12:25:34 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Replace=20`any`=20with=20proper?= =?UTF-8?q?=20union=20types=20in=20`threadPool.ts`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Imported `worker_threads` types using `import type`. - Assigned proper unions (`globalThis.X | worker_threads.X`) to cross-platform API variables. --- package-lock.json | 4 ++-- src/platform/threadPool.ts | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3a0212de..ccbf5817 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sqlite-explorer", - "version": "1.3.5", + "version": "1.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sqlite-explorer", - "version": "1.3.5", + "version": "1.5.2", "funding": [ { "type": "github", diff --git a/src/platform/threadPool.ts b/src/platform/threadPool.ts index 94596a59..3b01bd6f 100644 --- a/src/platform/threadPool.ts +++ b/src/platform/threadPool.ts @@ -84,11 +84,18 @@ export function createBrowserParentPort(scope: BrowserParentPortScope): NodeMess // Runtime Detection and API Export // ============================================================================ -let WorkerImpl: any; -let MessageChannelImpl: any; -let MessagePortImpl: any; -let BroadcastChannelImpl: any; -let parentPortImpl: any; +import type { + Worker as NodeWorker, + MessageChannel as NodeMessageChannel, + MessagePort as NodeMessagePortType, + BroadcastChannel as NodeBroadcastChannel +} from 'worker_threads'; + +let WorkerImpl: typeof globalThis.Worker | typeof NodeWorker; +let MessageChannelImpl: typeof globalThis.MessageChannel | typeof NodeMessageChannel; +let MessagePortImpl: typeof globalThis.MessagePort | typeof NodeMessagePortType; +let BroadcastChannelImpl: typeof globalThis.BroadcastChannel | typeof NodeBroadcastChannel; +let parentPortImpl: NodeMessagePort | NodeMessagePortType | null; if (import.meta.env?.VSCODE_BROWSER_EXT) { WorkerImpl = globalThis.Worker;