Skip to content

Add compatible overloads that accept ArrayBuffer to BigInt64Array/BigUint64Array - #60391

Merged
Ron Buckton (rbuckton) merged 2 commits into
mainfrom
fix60367
Nov 1, 2024
Merged

Add compatible overloads that accept ArrayBuffer to BigInt64Array/BigUint64Array#60391
Ron Buckton (rbuckton) merged 2 commits into
mainfrom
fix60367

Conversation

@rbuckton

Copy link
Copy Markdown
Contributor

This adds a missing overload common to other typed arrays to ensure BigUint64ArrayConstructor and BigInt64ArrayConstructor are consistent.

Fixes#60367

| Float64ArrayConstructor
| BigInt64ArrayConstructor

export function makeTypedArray(buffer: ArrayBuffer, ctr: TypedArrayConstructor) {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

NOTE: There is no output because this is only check for an error. Without the above changes to es2020.bigint.d.ts, an errors.txt is generated.

@jakebaileyJake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 1, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
test top400✅ Started✅ Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests with tsc comparing main and refs/pull/60391/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3131~~~p=1.000 n=6
Symbols62,34062,340~~~p=1.000 n=6
Types50,37950,379~~~p=1.000 n=6
Memory used192,792k (± 0.01%)193,504k (± 0.72%)~192,792k196,340kp=0.066 n=6
Parse Time1.31s (± 0.79%)1.32s (± 0.80%)~1.30s1.33sp=0.931 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.74s (± 0.11%)9.74s (± 0.29%)~9.71s9.78sp=0.871 n=6
Emit Time2.72s (± 1.14%)2.72s (± 0.83%)~2.68s2.75sp=0.328 n=6
Total Time14.49s (± 0.25%)14.49s (± 0.29%)~14.41s14.52sp=0.808 n=6
angular-1 - node (v18.15.0, x64)
Errors3333~~~p=1.000 n=6
Symbols947,886947,888+2 (+ 0.00%)~~p=0.001 n=6
Types410,840410,840~~~p=1.000 n=6
Memory used1,224,634k (± 0.00%)1,224,626k (± 0.00%)~1,224,569k1,224,676kp=0.575 n=6
Parse Time6.65s (± 0.69%)6.67s (± 0.78%)~6.61s6.75sp=0.688 n=6
Bind Time1.88s (± 0.29%)1.88s (± 0.40%)~1.87s1.89sp=0.476 n=6
Check Time31.77s (± 0.37%)31.84s (± 0.24%)~31.73s31.94sp=0.334 n=6
Emit Time15.26s (± 0.30%)15.19s (± 0.35%)-0.07s (- 0.46%)15.10s15.25sp=0.044 n=6
Total Time55.56s (± 0.24%)55.57s (± 0.21%)~55.40s55.72sp=0.936 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,494,9692,494,971+2 (+ 0.00%)~~p=0.001 n=6
Types908,592908,592~~~p=1.000 n=6
Memory used2,307,140k (± 0.00%)2,307,156k (± 0.00%)~2,307,101k2,307,197kp=0.575 n=6
Parse Time9.32s (± 0.25%)9.32s (± 0.21%)~9.30s9.35sp=0.623 n=6
Bind Time2.13s (± 0.46%)2.14s (± 0.38%)~2.12s2.14sp=0.336 n=6
Check Time75.11s (± 0.56%)75.29s (± 0.39%)~74.90s75.63sp=0.378 n=6
Emit Time0.28s (± 1.45%)0.28s (± 1.86%)~0.27s0.28sp=0.114 n=6
Total Time86.84s (± 0.49%)87.03s (± 0.33%)~86.63s87.36sp=0.378 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,258,4261,258,454+28 (+ 0.00%)~~p=0.001 n=6
Types266,328266,328~~~p=1.000 n=6
Memory used2,423,526k (± 0.01%)2,422,790k (± 0.01%)-736k (- 0.03%)2,422,427k2,423,039kp=0.013 n=6
Parse Time5.21s (± 1.07%)5.19s (± 1.17%)~5.13s5.29sp=0.470 n=6
Bind Time1.92s (± 0.61%)1.93s (± 0.64%)~1.92s1.95sp=0.655 n=6
Check Time35.51s (± 0.24%)35.63s (± 0.53%)~35.40s35.90sp=0.230 n=6
Emit Time3.01s (± 1.54%)3.02s (± 1.34%)~2.95s3.07sp=0.936 n=6
Total Time45.66s (± 0.28%)45.76s (± 0.49%)~45.54s46.14sp=0.471 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,258,4261,258,454+28 (+ 0.00%)~~p=0.001 n=6
Types266,328266,328~~~p=1.000 n=6
Memory used2,740,468k (±13.52%)2,500,439k (± 0.03%)~2,499,266k2,501,158kp=0.093 n=6
Parse Time6.68s (± 2.98%)6.55s (± 0.55%)~6.52s6.62sp=0.336 n=6
Bind Time2.16s (± 2.86%)2.17s (± 1.43%)~2.13s2.20sp=0.936 n=6
Check Time43.35s (± 0.25%)43.18s (± 0.43%)~42.84s43.36sp=0.066 n=6
Emit Time3.50s (± 2.02%)3.55s (± 5.74%)~3.39s3.92sp=0.873 n=6
Total Time55.69s (± 0.48%)55.44s (± 0.62%)~54.92s55.92sp=0.173 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols261,749261,751+2 (+ 0.00%)~~p=0.001 n=6
Types106,472106,472~~~p=1.000 n=6
Memory used438,877k (± 0.01%)438,827k (± 0.01%)~438,794k438,890kp=0.230 n=6
Parse Time3.55s (± 0.58%)3.54s (± 0.69%)~3.50s3.57sp=0.413 n=6
Bind Time1.32s (± 0.92%)1.31s (± 1.08%)~1.29s1.33sp=0.458 n=6
Check Time18.94s (± 0.19%)18.90s (± 0.25%)~18.82s18.96sp=0.195 n=6
Emit Time1.53s (± 1.14%)1.54s (± 1.26%)~1.51s1.56sp=0.626 n=6
Total Time25.34s (± 0.24%)25.29s (± 0.27%)~25.19s25.40sp=0.199 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors6868~~~p=1.000 n=6
Symbols225,919225,921+2 (+ 0.00%)~~p=0.001 n=6
Types94,41594,415~~~p=1.000 n=6
Memory used371,108k (± 0.02%)371,095k (± 0.01%)~371,058k371,144kp=1.000 n=6
Parse Time2.88s (± 0.93%)2.88s (± 0.69%)~2.85s2.91sp=0.871 n=6
Bind Time1.60s (± 1.35%)1.59s (± 1.45%)~1.56s1.63sp=0.746 n=6
Check Time16.31s (± 0.21%)16.36s (± 0.20%)+0.05s (+ 0.31%)16.32s16.40sp=0.036 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.78s (± 0.32%)20.83s (± 0.19%)~20.77s20.87sp=0.199 n=6
vscode - node (v18.15.0, x64)
Errors33~~~p=1.000 n=6
Symbols3,130,7833,130,785+2 (+ 0.00%)~~p=0.001 n=6
Types1,079,1901,079,191+1 (+ 0.00%)~~p=0.001 n=6
Memory used3,219,706k (± 0.01%)3,219,574k (± 0.01%)~3,219,039k3,220,081kp=0.471 n=6
Parse Time14.07s (± 0.43%)14.10s (± 0.69%)~13.96s14.22sp=0.810 n=6
Bind Time4.50s (± 2.50%)4.55s (± 2.53%)~4.45s4.71sp=0.471 n=6
Check Time85.89s (± 1.68%)85.05s (± 0.59%)~84.22s85.63sp=0.298 n=6
Emit Time26.14s (± 4.11%)26.56s (± 3.81%)~25.02s27.51sp=0.470 n=6
Total Time130.60s (± 1.60%)130.27s (± 0.94%)~128.63s131.72sp=0.936 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols288,121288,123+2 (+ 0.00%)~~p=0.001 n=6
Types116,929116,930+1 (+ 0.00%)~~p=0.001 n=6
Memory used439,559k (± 0.03%)439,515k (± 0.02%)~439,400k439,599kp=0.575 n=6
Parse Time4.06s (± 1.03%)4.07s (± 0.81%)~4.03s4.11sp=0.935 n=6
Bind Time1.75s (± 0.91%)1.76s (± 0.72%)~1.74s1.77sp=0.402 n=6
Check Time18.68s (± 0.47%)18.70s (± 0.41%)~18.61s18.80sp=1.000 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.50s (± 0.48%)24.52s (± 0.35%)~24.43s24.64sp=0.810 n=6
xstate-main - node (v18.15.0, x64)
Errors33~~~p=1.000 n=6
Symbols543,130543,132+2 (+ 0.00%)~~p=0.001 n=6
Types181,889181,889~~~p=1.000 n=6
Memory used485,521k (± 0.01%)485,566k (± 0.01%)~485,512k485,637kp=0.298 n=6
Parse Time4.18s (± 0.80%)4.20s (± 0.56%)~4.16s4.23sp=0.561 n=6
Bind Time1.46s (± 0.57%)1.47s (± 1.03%)~1.46s1.50sp=0.276 n=6
Check Time23.76s (± 0.48%)23.69s (± 0.32%)~23.57s23.79sp=0.377 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time29.40s (± 0.31%)29.36s (± 0.28%)~29.24s29.46sp=0.688 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60391/merge:

Everything looks good!

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Milestone BugPRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In 5.7 beta, BigInt64ArrayConstructor mismatches with other typed arrays

4 participants

@rbuckton@typescript-bot@jakebailey@sandersn