mirror of
https://github.com/denoland/deno.git
synced 2024-12-01 16:51:13 -05:00
Remove __workers namespace (#4665)
This commit is contained in:
parent
86fd0c66a6
commit
6660fb25c9
1 changed files with 13 additions and 23 deletions
26
cli/js/lib.deno.shared_globals.d.ts
vendored
26
cli/js/lib.deno.shared_globals.d.ts
vendored
|
@ -28,7 +28,6 @@ declare interface WindowOrWorkerGlobalScope {
|
||||||
ReadableStream: __domTypes.ReadableStreamConstructor;
|
ReadableStream: __domTypes.ReadableStreamConstructor;
|
||||||
Request: __domTypes.RequestConstructor;
|
Request: __domTypes.RequestConstructor;
|
||||||
Response: typeof __fetch.Response;
|
Response: typeof __fetch.Response;
|
||||||
Worker: typeof __workers.WorkerImpl;
|
|
||||||
location: __domTypes.Location;
|
location: __domTypes.Location;
|
||||||
|
|
||||||
addEventListener: (
|
addEventListener: (
|
||||||
|
@ -251,7 +250,6 @@ declare const FormData: __domTypes.FormDataConstructor;
|
||||||
declare const ReadableStream: __domTypes.ReadableStreamConstructor;
|
declare const ReadableStream: __domTypes.ReadableStreamConstructor;
|
||||||
declare const Request: __domTypes.RequestConstructor;
|
declare const Request: __domTypes.RequestConstructor;
|
||||||
declare const Response: typeof __fetch.Response;
|
declare const Response: typeof __fetch.Response;
|
||||||
declare const Worker: typeof __workers.WorkerImpl;
|
|
||||||
|
|
||||||
declare const addEventListener: (
|
declare const addEventListener: (
|
||||||
type: string,
|
type: string,
|
||||||
|
@ -281,7 +279,6 @@ declare type FormData = __domTypes.FormData;
|
||||||
declare type ReadableStream<R = any> = __domTypes.ReadableStream<R>;
|
declare type ReadableStream<R = any> = __domTypes.ReadableStream<R>;
|
||||||
declare type Request = __domTypes.Request;
|
declare type Request = __domTypes.Request;
|
||||||
declare type Response = __domTypes.Response;
|
declare type Response = __domTypes.Response;
|
||||||
declare type Worker = __workers.Worker;
|
|
||||||
|
|
||||||
declare interface ImportMeta {
|
declare interface ImportMeta {
|
||||||
url: string;
|
url: string;
|
||||||
|
@ -1513,26 +1510,19 @@ declare namespace __url {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare namespace __workers {
|
declare class Worker {
|
||||||
export interface Worker {
|
|
||||||
onerror?: (e: Event) => void;
|
|
||||||
onmessage?: (e: { data: any }) => void;
|
|
||||||
onmessageerror?: () => void;
|
|
||||||
postMessage(data: any): void;
|
|
||||||
terminate(): void;
|
|
||||||
}
|
|
||||||
export interface WorkerOptions {
|
|
||||||
type?: "classic" | "module";
|
|
||||||
name?: string;
|
|
||||||
}
|
|
||||||
export class WorkerImpl implements Worker {
|
|
||||||
onerror?: (e: Event) => void;
|
onerror?: (e: Event) => void;
|
||||||
onmessage?: (data: any) => void;
|
onmessage?: (data: any) => void;
|
||||||
onmessageerror?: () => void;
|
onmessageerror?: () => void;
|
||||||
constructor(specifier: string, options?: WorkerOptions);
|
constructor(
|
||||||
|
specifier: string,
|
||||||
|
options?: {
|
||||||
|
type?: "classic" | "module";
|
||||||
|
name?: string;
|
||||||
|
}
|
||||||
|
);
|
||||||
postMessage(data: any): void;
|
postMessage(data: any): void;
|
||||||
terminate(): void;
|
terminate(): void;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare namespace performance {
|
declare namespace performance {
|
||||||
|
|
Loading…
Reference in a new issue