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;