mirror of
https://github.com/denoland/deno.git
synced 2025-01-11 08:33:43 -05:00
fix(ext/crypto): adjust getRandomValues
types (#14714)
This commit is contained in:
parent
d78fd8ec39
commit
4e26bcb2bb
2 changed files with 14 additions and 2 deletions
|
@ -37,12 +37,24 @@ Deno.test(function getRandomValuesInt32Array() {
|
|||
assertNotEquals(arr, new Int32Array(8));
|
||||
});
|
||||
|
||||
Deno.test(function getRandomValuesBigInt64Array() {
|
||||
const arr = new BigInt64Array(8);
|
||||
crypto.getRandomValues(arr);
|
||||
assertNotEquals(arr, new BigInt64Array(8));
|
||||
});
|
||||
|
||||
Deno.test(function getRandomValuesUint32Array() {
|
||||
const arr = new Uint32Array(8);
|
||||
crypto.getRandomValues(arr);
|
||||
assertNotEquals(arr, new Uint32Array(8));
|
||||
});
|
||||
|
||||
Deno.test(function getRandomValuesBigUint64Array() {
|
||||
const arr = new BigUint64Array(8);
|
||||
crypto.getRandomValues(arr);
|
||||
assertNotEquals(arr, new BigUint64Array(8));
|
||||
});
|
||||
|
||||
Deno.test(function getRandomValuesReturnValue() {
|
||||
const arr = new Uint32Array(8);
|
||||
const rtn = crypto.getRandomValues(arr);
|
||||
|
|
4
ext/crypto/lib.deno_crypto.d.ts
vendored
4
ext/crypto/lib.deno_crypto.d.ts
vendored
|
@ -326,8 +326,8 @@ declare interface Crypto {
|
|||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Uint8ClampedArray
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| BigInt64Array
|
||||
| BigUint64Array
|
||||
| DataView
|
||||
| null,
|
||||
>(
|
||||
|
|
Loading…
Reference in a new issue