summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.shared_globals.d.ts
diff options
context:
space:
mode:
authorOliver Lenehan <sunsetkookaburra+github@outlook.com.au>2020-05-08 22:30:53 +1000
committerGitHub <noreply@github.com>2020-05-08 14:30:53 +0200
commita08a4abac116eda498f8ad2df13b3816ec36c9ad (patch)
tree261a52fe93fc184f8af9aaf037cd74f27a532f76 /cli/js/lib.deno.shared_globals.d.ts
parentc0e8bae498b1892b994757b5f4972913c076a65e (diff)
feat(workers): "crypto" global accessible in Worker scope (#5121)
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r--cli/js/lib.deno.shared_globals.d.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts
index d96230447..617a75fea 100644
--- a/cli/js/lib.deno.shared_globals.d.ts
+++ b/cli/js/lib.deno.shared_globals.d.ts
@@ -192,6 +192,7 @@ declare function clearInterval(id?: number): void;
declare function queueMicrotask(func: Function): void;
declare var console: Console;
+declare var crypto: Crypto;
declare function addEventListener(
type: string,
@@ -578,6 +579,26 @@ declare class Console {
static [Symbol.hasInstance](instance: Console): boolean;
}
+declare interface Crypto {
+ readonly subtle: null;
+ getRandomValues<
+ T extends
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | Uint8Array
+ | Uint16Array
+ | Uint32Array
+ | Uint8ClampedArray
+ | Float32Array
+ | Float64Array
+ | DataView
+ | null
+ >(
+ array: T
+ ): T;
+}
+
type FormDataEntryValue = File | string;
/** Provides a way to easily construct a set of key/value pairs representing