mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 05:04:48 +00:00
feat(workers): "crypto" global accessible in Worker scope (#5121)
This commit is contained in:
parent
c0e8bae498
commit
a08a4abac1
6 changed files with 43 additions and 24 deletions
21
cli/js/lib.deno.shared_globals.d.ts
vendored
21
cli/js/lib.deno.shared_globals.d.ts
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue