Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.worker.d.ts>DedicatedWorkerGlobalScope

A modern runtime for JavaScript and TypeScript.
Latest
interface DedicatedWorkerGlobalScope
implements WorkerGlobalScope
import { type DedicatedWorkerGlobalScope } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.worker.d.ts";

Properties

readonly
name: string
onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null
onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null

Methods

close(): void
postMessage(message: any, transfer: Transferable[]): void
postMessage(message: any, options?: StructuredSerializeOptions): void
addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(
type: K,
listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(
type: K,
listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
variable DedicatedWorkerGlobalScope
import { DedicatedWorkerGlobalScope } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.worker.d.ts";

type

{ readonly prototype: DedicatedWorkerGlobalScope; new (): never; }