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

Big(Int|Uint)64ArrayConstructor: missing from Iterable #45198

Open
mfulton26 opened this issue Jul 27, 2021 · 0 comments · May be fixed by #50450, #58188 or #60151
Open

Big(Int|Uint)64ArrayConstructor: missing from Iterable #45198

mfulton26 opened this issue Jul 27, 2021 · 0 comments · May be fixed by #50450, #58188 or #60151
Assignees
Labels
Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fix Available A PR has been opened for this issue Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@mfulton26
Copy link
Contributor

mfulton26 commented Jul 27, 2021

lib Update Request

Configuration Check

My compilation target is ESNext and my lib is the default.

Missing / Incorrect Definition

BigInt64Array.from is missing an iterable overload (same for BigUint64Array).

Sample Code

console.log(
  Int32Array.from(new Set([1, 2, 3]), (value) => value ** 2).join(", ")
);
console.log(
  BigInt64Array.from(new Set([1n, 2n, 3n]), (value) => value ** 2n).join(", ")
);
Argument of type 'Set<bigint>' is not assignable to parameter of type 'ArrayLike<unknown>'.
  Property 'length' is missing in type 'Set<bigint>' but required in type 'ArrayLike<unknown>'.

Documentation Link

TypedArray.from() - JavaScript | MDN

@andrewbranch andrewbranch added this to the TypeScript 4.5.0 milestone Aug 4, 2021
@andrewbranch andrewbranch added the Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript label Aug 4, 2021
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Dec 15, 2021
@typescript-bot typescript-bot added the Fix Available A PR has been opened for this issue label Dec 31, 2021
@graphemecluster graphemecluster linked a pull request Oct 31, 2022 that will close this issue
mfulton26 added a commit to mfulton26/TypeScript that referenced this issue Jul 9, 2024
Each concrete typed array type and constructor share common interfaces.

Library types can be defined extending base interfaces:

1. higher code reuse
2. less duplication
3. easier maintenance (less error prone)

Closes microsoft#15402
Fixes microsoft#45198
mfulton26 added a commit to mfulton26/TypeScript that referenced this issue Jul 9, 2024
Each concrete typed array type and constructor share common interfaces.

Library types can be defined extending base interfaces:

1. higher code reuse
2. less duplication
3. easier maintenance (less error prone)

Closes microsoft#15402
Fixes microsoft#45198
mfulton26 added a commit to mfulton26/TypeScript that referenced this issue Jul 9, 2024
Each concrete typed array type and constructor share common interfaces.

Library types can be defined extending base interfaces:

1. higher code reuse
2. less duplication
3. easier maintenance (less error prone)

Closes microsoft#15402
Fixes microsoft#45198
mfulton26 added a commit to mfulton26/TypeScript that referenced this issue Jul 9, 2024
Each concrete typed array type and constructor share common interfaces.

Library types can be defined extending base interfaces:

1. higher code reuse
2. less duplication
3. easier maintenance (less error prone)

Closes microsoft#15402
Fixes microsoft#45198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment