@xylabs/threads 4.3.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/threads",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Web workers & worker threads as simple as a function call",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,15 @@ import type {
18
18
  ImplementationExport, ThreadsWorkerOptions, WorkerImplementation,
19
19
  } from '../types/master'
20
20
 
21
+ interface WorkerGlobalScope {
22
+ addEventListener(eventName: string, listener: (event: Event) => void): void
23
+ postMessage(message: any, transferables?: any[]): void
24
+ removeEventListener(eventName: string, listener: (event: Event) => void): void
25
+ }
26
+
21
27
  declare const __non_webpack_require__: typeof require
28
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
+ declare const self: WorkerGlobalScope
22
30
 
23
31
  let tsNodeAvailable: boolean | undefined
24
32