1
0
Fork 0
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:
Mark Ladyshau 2022-06-02 15:15:46 +02:00 committed by GitHub
parent d78fd8ec39
commit 4e26bcb2bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -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);

View file

@ -326,8 +326,8 @@ declare interface Crypto {
| Uint16Array
| Uint32Array
| Uint8ClampedArray
| Float32Array
| Float64Array
| BigInt64Array
| BigUint64Array
| DataView
| null,
>(