Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crypto.getRandomValues definition doesn't include BigUint64Array #14710

Closed
FergoTheGreat opened this issue May 24, 2022 · 4 comments · Fixed by #14714
Closed

Crypto.getRandomValues definition doesn't include BigUint64Array #14710

FergoTheGreat opened this issue May 24, 2022 · 4 comments · Fixed by #14714
Labels
bug Something isn't working correctly cli related to cli/ dir good first issue Good for newcomers

Comments

@FergoTheGreat
Copy link

In lib.deno.crypto.d.ts Crypto.getRandomValues does not include BigUint64Array despite v8 supporting this type with getRandomValues.

declare interface Crypto {
  readonly subtle: SubtleCrypto;
  getRandomValues<
    T extends
      | Int8Array
      | Int16Array
      | Int32Array
      | Uint8Array
      | Uint16Array
      | Uint32Array
      | Uint8ClampedArray
      | Float32Array
      | Float64Array
      | DataView
      | null,
  >(
    array: T,
  ): T;
  randomUUID(): string;
}
@FergoTheGreat FergoTheGreat changed the title Crypto.getRandomValues doesn't support BigUint64Array Crypto.getRandomValues definition doesn't include BigUint64Array May 24, 2022
@lucacasonato
Copy link
Member

v8 supporting this type with getRandomValues.

V8 is not the one implementing this API, it is Deno itself.

Valid bug though.

@lucacasonato lucacasonato added bug Something isn't working correctly good first issue Good for newcomers cli related to cli/ dir l-typescript labels May 24, 2022
@mrkldshv
Copy link
Contributor

Hey, I'll take this issue.

@darvesh
Copy link

darvesh commented May 24, 2022

@mrkldshv, have you started working on it? If not, may I create PR with the fix?

@mrkldshv
Copy link
Contributor

Yeah, I've started working on it. Will submit PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants