summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.worker.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.deno.worker.d.ts')
-rw-r--r--cli/dts/lib.deno.worker.d.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.worker.d.ts b/cli/dts/lib.deno.worker.d.ts
index 74609e8ab..a8f42f336 100644
--- a/cli/dts/lib.deno.worker.d.ts
+++ b/cli/dts/lib.deno.worker.d.ts
@@ -58,3 +58,26 @@ declare var onerror:
declare var close: () => void;
declare var name: string;
declare var postMessage: (message: any) => void;
+
+// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is.
+// The types there must first be split into window, worker and global types.
+/** The absolute location of the script executed by the Worker. Such an object
+ * is initialized for each worker and is available via the
+ * WorkerGlobalScope.location property obtained by calling self.location. */
+declare class WorkerLocation {
+ constructor();
+ readonly hash: string;
+ readonly host: string;
+ readonly hostname: string;
+ readonly href: string;
+ toString(): string;
+ readonly origin: string;
+ readonly pathname: string;
+ readonly port: string;
+ readonly protocol: string;
+ readonly search: string;
+}
+
+// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is.
+// The types there must first be split into window, worker and global types.
+declare var location: WorkerLocation;