mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 16:49:18 -05:00
fix(types): align global deno worker type with deno.worker/webworker one (#21936)
Transpiler doing type checking such as the ones used in dnt or bundler fail because of incompatible Worker types if env like browser are targeted. Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
This commit is contained in:
parent
88bc57d764
commit
99f9fa5556
1 changed files with 3 additions and 3 deletions
6
cli/tsc/dts/lib.deno.shared_globals.d.ts
vendored
6
cli/tsc/dts/lib.deno.shared_globals.d.ts
vendored
|
@ -522,9 +522,9 @@ declare interface WorkerOptions {
|
|||
|
||||
/** @category Web Workers */
|
||||
declare interface Worker extends EventTarget {
|
||||
onerror?: (e: ErrorEvent) => void;
|
||||
onmessage?: (e: MessageEvent) => void;
|
||||
onmessageerror?: (e: MessageEvent) => void;
|
||||
onerror: (this: Worker, e: ErrorEvent) => any | null;
|
||||
onmessage: (this: Worker, e: MessageEvent) => any | null;
|
||||
onmessageerror: (this: Worker, e: MessageEvent) => any | null;
|
||||
postMessage(message: any, transfer: Transferable[]): void;
|
||||
postMessage(message: any, options?: StructuredSerializeOptions): void;
|
||||
addEventListener<K extends keyof WorkerEventMap>(
|
||||
|
|
Loading…
Reference in a new issue