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

Better TypedArray type checking #153929

Merged
merged 1 commit into from Jul 11, 2022
Merged

Better TypedArray type checking #153929

merged 1 commit into from Jul 11, 2022

Conversation

Idefix2020
Copy link
Contributor

The previous implementation had a hard-coded list of TypedArray types that the environment needed to have or vscode would not work at all. This implementation simply checks for all TypedArray types.

This PR fixes #153906

Copy link
Contributor

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

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

Looks good to me. I tested it with this code here:

var v1 = new Uint8Array(0);
var v2 = new Uint16Array(1);
var v3 = new Uint32Array(2);
var v4 = new BigInt64Array(3);
const TypedArray = Object.getPrototypeOf(Uint8Array);
console.log('Made types');
console.log(`v1 is ${v1 instanceof TypedArray}`);
console.log(`v2 is ${v2 instanceof TypedArray}`);
console.log(`v3 is ${v3 instanceof TypedArray}`);
console.log(`v4 is ${v4 instanceof TypedArray}`);

@rchiodo rchiodo enabled auto-merge (squash) July 11, 2022 17:00
@rchiodo rchiodo merged commit c137fb2 into microsoft:main Jul 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blank Screen on iOS Safari 14.3
3 participants