Skip to content

Add IntegerTypedArray type for use with crypto.getRandomValues #61767

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lionel-rowe
Copy link
Contributor

@lionel-rowe lionel-rowe commented May 27, 2025

Fixes #61768

Towards microsoft/TypeScript-DOM-lib-generator#1194

The current DOM types <T extends ArrayBufferView | null> are wrong for crypto.getRandomValues. null is never accepted, and ArrayBufferView is too broad as float arrays also aren't accepted.

However, fixing in TypeScript-DOM-lib-generator requires conditional inclusion of BigInt64Array | BigUint64Array depending on ES2020 availability. I don't think there's a way to fix that within TypeScript-DOM-lib-generator without this upstream change in TypeScript.

@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 02:39
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog May 27, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label May 27, 2025
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

1 similar comment
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

IntegerTypedArray type required for use with crypto.getRandomValues
2 participants