Skip to content

Fix to use string literal type in ArrayBuffer's Symbol.toStringTag - #60150

Merged
Ron Buckton (rbuckton) merged 5 commits into
microsoft:mainfrom
petamoriken:fix/arraybuffer-tostringtag
Feb 24, 2025
Merged

Fix to use string literal type in ArrayBuffer's Symbol.toStringTag#60150
Ron Buckton (rbuckton) merged 5 commits into
microsoft:mainfrom
petamoriken:fix/arraybuffer-tostringtag

Conversation

@petamoriken

Copy link
Copy Markdown
Contributor

Fixes#60149

@typescript-botTypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 6, 2024
@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) test it

@typescript-bot

TypeScript Bot (typescript-bot) commented Oct 8, 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

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

Something interesting changed - please have a look.

Details

effect

tsconfig.json

puppeteer

test/tsconfig.json

packages/testserver/tsconfig.json

packages/puppeteer-core/tsconfig.json

pyright

/mnt/ts_downloads/_/m/pyright/build.sh

  • [NEW] error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'Uint8Array<ArrayBufferLike>'.
    • /mnt/ts_downloads/_/m/pyright/pyright: ../pyright-internal/src/common/realFileSystem.ts(98,32)
    • /mnt/ts_downloads/_/m/pyright/pyright-internal: src/common/realFileSystem.ts(98,32)
    • /mnt/ts_downloads/_/m/pyright/pyright-internal: src/tests/harness/vfs/filesystem.ts(1202,28)
    • /mnt/ts_downloads/_/m/pyright/vscode-pyright: ../pyright-internal/src/common/realFileSystem.ts(98,32)
  • [NEW] error TS2345: Argument of type 'string | Buffer' is not assignable to parameter of type 'string | ArrayBufferView'.
    • /mnt/ts_downloads/_/m/pyright/pyright: ../pyright-internal/src/common/realFileSystem.ts(299,36)
    • /mnt/ts_downloads/_/m/pyright/pyright-internal: src/common/realFileSystem.ts(299,36)
    • /mnt/ts_downloads/_/m/pyright/vscode-pyright: ../pyright-internal/src/common/realFileSystem.ts(299,36)

webpack

tsconfig.types.json

tsconfig.json

xterm.js

src/tsconfig-library-base.json

  • [NEW] error TS2430: Interface 'Buffer' incorrectly extends interface 'Uint8Array<ArrayBufferLike>'.
  • [NEW] error TS2344: Type 'Buffer' does not satisfy the constraint 'ArrayBufferView'.

@typescript-bot

Copy link
Copy Markdown
Contributor

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

There were interesting changes:

Changes are too big to display here, please check the log.

You can check the log here.

@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 used195,694k (± 0.76%)195,781k (± 0.72%)~192,921k196,537kp=0.689 n=6
Parse Time1.61s (± 1.77%)1.61s (± 0.68%)~1.59s1.62sp=0.460 n=6
Bind Time0.88s (± 1.38%)0.87s (± 1.03%)~0.86s0.88sp=0.362 n=6
Check Time11.72s (± 0.57%)11.74s (± 0.38%)~11.66s11.78sp=0.470 n=6
Emit Time3.43s (± 5.31%)3.36s (± 3.23%)~3.24s3.54sp=0.630 n=6
Total Time17.63s (± 0.91%)17.57s (± 0.76%)~17.39s17.79sp=0.630 n=6
angular-1 - node (v18.15.0, x64)
Errors3352🔻+19 (+57.58%)~~p=0.001 n=6
Symbols947,886948,069+183 (+ 0.02%)~~p=0.001 n=6
Types410,840410,781-59 (- 0.01%)~~p=0.001 n=6
Memory used1,224,780k (± 0.00%)1,224,987k (± 0.01%)+208k (+ 0.02%)1,224,908k1,225,111kp=0.005 n=6
Parse Time8.03s (± 1.21%)8.14s (± 1.15%)+0.11s (+ 1.41%)7.97s8.24sp=0.044 n=6
Bind Time2.27s (± 1.10%)2.27s (± 0.77%)~2.25s2.30sp=1.000 n=6
Check Time37.94s (± 0.26%)38.03s (± 0.51%)~37.80s38.29sp=0.470 n=6
Emit Time18.22s (± 0.34%)18.38s (± 0.34%)+0.16s (+ 0.85%)18.33s18.50sp=0.005 n=6
Total Time66.47s (± 0.30%)66.82s (± 0.38%)~66.52s67.19sp=0.078 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,529,6782,529,678~~~p=1.000 n=6
Types916,161916,161~~~p=1.000 n=6
Memory used2,341,165k (± 0.00%)2,341,212k (± 0.00%)~2,341,101k2,341,339kp=0.298 n=6
Parse Time11.27s (± 1.44%)11.17s (± 0.41%)~11.12s11.24sp=0.109 n=6
Bind Time2.61s (± 2.10%)2.62s (± 1.01%)~2.57s2.65sp=1.000 n=6
Check Time90.78s (± 1.17%)90.51s (± 0.37%)~89.98s90.87sp=0.936 n=6
Emit Time0.35s (± 3.04%)0.35s (± 3.61%)~0.33s0.36sp=0.456 n=6
Total Time105.02s (± 0.98%)104.66s (± 0.34%)~104.11s105.05sp=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,258,1091,258,107-2 (- 0.00%)~~p=0.001 n=6
Types266,266266,267+1 (+ 0.00%)~~p=0.001 n=6
Memory used3,146,257k (± 0.02%)3,146,922k (± 0.04%)~3,145,628k3,148,186kp=0.471 n=6
Parse Time8.18s (± 0.61%)8.24s (± 1.15%)~8.12s8.36sp=0.297 n=6
Bind Time2.87s (± 1.11%)2.75s (± 5.51%)~2.52s2.88sp=0.109 n=6
Check Time53.14s (± 0.10%)53.05s (± 0.33%)~52.85s53.32sp=0.226 n=6
Emit Time4.37s (± 2.27%)4.29s (± 2.15%)~4.18s4.42sp=0.173 n=6
Total Time68.57s (± 0.22%)68.32s (± 0.20%)-0.25s (- 0.36%)68.09s68.45sp=0.031 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,258,1091,258,107-2 (- 0.00%)~~p=0.001 n=6
Types266,266266,267+1 (+ 0.00%)~~p=0.001 n=6
Memory used3,005,080k (±11.14%)2,498,993k (± 0.04%)🟩-506,086k (-16.84%)2,497,159k2,499,861kp=0.045 n=6
Parse Time8.50s (± 1.95%)8.18s (± 0.31%)🟩-0.33s (- 3.82%)8.13s8.20sp=0.005 n=6
Bind Time2.63s (± 2.14%)2.68s (± 1.66%)~2.63s2.74sp=0.149 n=6
Check Time53.39s (± 0.39%)53.55s (± 0.25%)~53.34s53.68sp=0.173 n=6
Emit Time4.34s (± 3.06%)4.39s (± 3.42%)~4.18s4.57sp=0.521 n=6
Total Time68.87s (± 0.48%)68.81s (± 0.27%)~68.62s69.10sp=1.000 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols261,786261,786~~~p=1.000 n=6
Types106,508106,508~~~p=1.000 n=6
Memory used438,785k (± 0.01%)438,754k (± 0.02%)~438,678k438,848kp=0.471 n=6
Parse Time3.54s (± 1.36%)3.53s (± 0.91%)~3.50s3.58sp=0.936 n=6
Bind Time1.32s (± 0.80%)1.32s (± 1.04%)~1.30s1.34sp=1.000 n=6
Check Time18.91s (± 0.54%)18.85s (± 0.49%)~18.71s18.98sp=0.335 n=6
Emit Time1.54s (± 0.95%)1.53s (± 1.14%)~1.51s1.56sp=0.417 n=6
Total Time25.30s (± 0.37%)25.23s (± 0.39%)~25.06s25.35sp=0.261 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors6869+1 (+ 1.47%)~~p=0.001 n=6
Symbols225,919225,788-131 (- 0.06%)~~p=0.001 n=6
Types94,41594,293-122 (- 0.13%)~~p=0.001 n=6
Memory used371,109k (± 0.01%)370,941k (± 0.01%)-169k (- 0.05%)370,889k371,010kp=0.005 n=6
Parse Time2.90s (± 0.53%)2.88s (± 0.98%)~2.85s2.93sp=0.086 n=6
Bind Time1.58s (± 1.76%)1.58s (± 0.74%)~1.57s1.60sp=0.460 n=6
Check Time16.36s (± 0.51%)16.36s (± 0.36%)~16.27s16.42sp=0.936 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.84s (± 0.30%)20.83s (± 0.39%)~20.70s20.93sp=1.000 n=6
vscode - node (v18.15.0, x64)
Errors38🔻+5 (+166.67%)~~p=0.001 n=6
Symbols3,113,2313,113,202-29 (- 0.00%)~~p=0.001 n=6
Types1,073,1561,073,145-11 (- 0.00%)~~p=0.001 n=6
Memory used3,206,566k (± 0.00%)3,206,667k (± 0.00%)~3,206,501k3,206,765kp=0.471 n=6
Parse Time14.18s (± 3.01%)13.98s (± 0.29%)~13.92s14.03sp=0.421 n=6
Bind Time4.50s (± 2.83%)4.39s (± 0.45%)~4.35s4.41sp=0.103 n=6
Check Time84.08s (± 2.42%)84.74s (± 1.18%)~83.81s86.69sp=0.230 n=6
Emit Time24.68s (± 9.16%)23.70s (± 8.76%)~22.24s26.60sp=0.093 n=6
Total Time127.44s (± 2.20%)126.80s (± 2.25%)~124.67s131.66sp=0.378 n=6
webpack - node (v18.15.0, x64)
Errors028🔻+28 (+ ∞%)~~p=0.001 n=6
Symbols285,172285,552+380 (+ 0.13%)~~p=0.001 n=6
Types115,780116,512+732 (+ 0.63%)~~p=0.001 n=6
Memory used434,858k (± 0.01%)435,970k (± 0.03%)+1,112k (+ 0.26%)435,873k436,231kp=0.005 n=6
Parse Time3.31s (± 0.65%)3.30s (± 0.80%)~3.27s3.33sp=1.000 n=6
Bind Time1.46s (± 0.28%)1.46s (± 0.28%)~1.46s1.47sp=0.218 n=6
Check Time15.26s (± 0.45%)15.54s (± 0.34%)+0.28s (+ 1.81%)15.48s15.61sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.03s (± 0.32%)20.30s (± 0.39%)+0.28s (+ 1.38%)20.21s20.41sp=0.005 n=6
xstate-main - node (v18.15.0, x64)
Errors33~~~p=1.000 n=6
Symbols540,222540,222~~~p=1.000 n=6
Types181,145181,145~~~p=1.000 n=6
Memory used483,875k (± 0.02%)483,862k (± 0.01%)~483,797k483,910kp=0.936 n=6
Parse Time3.36s (± 0.87%)3.37s (± 0.99%)~3.32s3.42sp=0.568 n=6
Bind Time1.18s (± 1.84%)1.17s (± 0.89%)~1.16s1.19sp=0.806 n=6
Check Time19.11s (± 0.09%)19.09s (± 0.24%)~19.03s19.15sp=0.570 n=6
Emit Time0.00s0.00s (±244.70%)~0.00s0.01sp=0.405 n=6
Total Time23.65s (± 0.18%)23.64s (± 0.32%)~23.52s23.73sp=0.747 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/60150/merge:

Something interesting changed - please have a look.

Details

actualbudget/actual

2 of 5 projects failed to build with the old tsc and were ignored

packages/loot-core/tsconfig.api.json

angular/angular-cli

8 of 24 projects failed to build with the old tsc and were ignored

tests/legacy-cli/tsconfig.json

apollographql/apollo-client

2 of 12 projects failed to build with the old tsc and were ignored

config/tsconfig.json

blakeblackshear/frigate

web/tsconfig.json

Chocobozzz/PeerTube

6 of 12 projects failed to build with the old tsc and were ignored

packages/types-generator/tsconfig.types.json

packages/types-generator/tsconfig.json

packages/tests/tsconfig.json

continuedev/continue

6 of 9 projects failed to build with the old tsc and were ignored

extensions/vscode/tsconfig.json

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are some more interesting changes from running the top 400 repos suite

Details

Eugeny/tabby

11 of 29 projects failed to build with the old tsc and were ignored

tabby-web-demo/tsconfig.json

tabby-web/tsconfig.json

tabby-terminal/tsconfig.json

tabby-ssh/tsconfig.json

tabby-settings/tsconfig.json

tabby-plugin-manager/tsconfig.json

tabby-local/tsconfig.json

tabby-linkifier/tsconfig.json

tabby-electron/tsconfig.json

tabby-core/tsconfig.typings.json

tabby-core/tsconfig.json

tabby-community-color-schemes/tsconfig.json

app/tsconfig.main.json

app/tsconfig.json

FlowiseAI/Flowise

1 of 3 projects failed to build with the old tsc and were ignored

packages/components/tsconfig.json

FuelLabs/fuels-ts

34 of 58 projects failed to build with the old tsc and were ignored

packages/crypto/tsconfig.dts.json

packages/abi-typegen/tsconfig.json

packages/abi-typegen/tsconfig.dts.json

gitpod-io/gitpod

12 of 20 projects failed to build with the old tsc and were ignored

components/gitpod-db/tsconfig.json

hexojs/hexo

tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView> | Stream'.

homebridge/homebridge

tsconfig.json

  • error TS2345: Argument of type 'string | Buffer | TypedArray | DataView<ArrayBufferLike>' is not assignable to parameter of type 'BinaryLike'.

honojs/hono

7 of 8 projects failed to build with the old tsc and were ignored

tsconfig.json

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are some more interesting changes from running the top 400 repos suite

Details

jupyterlab/jupyterlab

46 of 59 projects failed to build with the old tsc and were ignored

packages/ui-components/examples/simple-windowed-list/tsconfig.json

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are some more interesting changes from running the top 400 repos suite

Details

lerna/lerna

1 of 42 projects failed to build with the old tsc and were ignored

tools/scripts/tsconfig.scripts.json

tools/scripts/tsconfig.e2e.json

microsoft/vscode

5 of 53 projects failed to build with the old tsc and were ignored

src/tsconfig.tsec.json

src/tsconfig.monaco.json

extensions/vscode-test-resolver/tsconfig.json

extensions/vscode-api-tests/tsconfig.json

extensions/typescript-language-features/tsconfig.json

extensions/tunnel-forwarding/tsconfig.json

extensions/ipynb/tsconfig.json

extensions/html-language-features/client/tsconfig.json

extensions/git/tsconfig.json

extensions/emmet/tsconfig.json

extensions/debug-auto-launch/tsconfig.json

extensions/css-language-features/client/tsconfig.json

build/tsconfig.build.json

neoclide/coc.nvim

tsconfig.json

nexe/nexe

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

omnivore-app/omnivore

5 of 22 projects failed to build with the old tsc and were ignored

packages/rss-handler/tsconfig.json

openai-translator/openai-translator

tsconfig.json

peers/peerjs

tsconfig.json

puppeteer/puppeteer

7 of 14 projects failed to build with the old tsc and were ignored

packages/testserver/tsconfig.json

redis/node-redis

6 of 8 projects failed to build with the old tsc and were ignored

packages/client/tsconfig.json

socketio/socket.io

12 of 30 projects failed to build with the old tsc and were ignored

packages/engine.io/tsconfig.json

subquery/subql

4 of 6 projects failed to build with the old tsc and were ignored

packages/query/tsconfig.json

Tonejs/Tone.js

tsconfig.json

uuidjs/uuid

tsconfig.json

tsconfig.cjs.json

video-dev/hls.js

tsconfig.json

VSCodeVim/Vim

tsconfig.json

@petamoriken

Copy link
Copy Markdown
ContributorAuthor

I haven't figured it out yet, but maybe we need to update the Buffer type in @types/node.

@petamoriken

Kenta Moriuchi (petamoriken) commented Oct 10, 2024

Copy link
Copy Markdown
ContributorAuthor

Comment threadsrc/harness/vfsUtil.ts
@petamoriken

Copy link
Copy Markdown
ContributorAuthor

Ron Buckton (@rbuckton) IMO, this PR should be included in TypeScript 5.7, but is it possible?

@rbuckton

Copy link
Copy Markdown
Contributor

No, this will need to wait for 5.8

@typescript-botTypeScript Bot (typescript-bot) added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 22, 2025
@petamoriken

Copy link
Copy Markdown
ContributorAuthor

Ron Buckton (@rbuckton) Will this PR be included in TypeScript 5.8?

@rbuckton

Copy link
Copy Markdown
Contributor

TypeScript Bot (@typescript-bot) test it

@typescript-bot

TypeScript Bot (typescript-bot) commented Jan 30, 2025

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

Ron Buckton (@rbuckton) Here are the results of running the user tests with tsc comparing main and refs/pull/60150/merge:

Something interesting changed - please have a look.

Details

effect

tsconfig.json

puppeteer

test/tsconfig.json

packages/testserver/tsconfig.json

packages/puppeteer-core/tsconfig.json

pyright

/mnt/ts_downloads/_/m/pyright/build.sh

  • [NEW] error TS2394: This overload signature is not compatible with its implementation signature.
    • /mnt/ts_downloads/_/m/pyright/pyright-internal: src/tests/harness/vfs/filesystem.ts(818,5)

webpack

tsconfig.types.json

tsconfig.json

xterm.js

src/tsconfig-library-base.json

  • [NEW] error TS2430: Interface 'Buffer' incorrectly extends interface 'Uint8Array<ArrayBufferLike>'.
  • [NEW] error TS2344: Type 'Buffer' does not satisfy the constraint 'ArrayBufferView'.

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Ron Buckton (@rbuckton), the results of running the DT tests are ready.

There were interesting changes:

Changes are too big to display here, please check the log.

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
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)
Errors3434~~~p=1.000 n=6
Symbols62,39062,390~~~p=1.000 n=6
Types50,39550,395~~~p=1.000 n=6
Memory used196,779k (± 0.10%)196,151k (± 0.70%)~193,366k196,987kp=0.298 n=6
Parse Time1.61s (± 1.71%)1.61s (± 0.93%)~1.59s1.63sp=0.935 n=6
Bind Time0.87s (± 2.47%)0.88s (± 1.17%)~0.87s0.89sp=0.452 n=6
Check Time11.72s (± 0.68%)11.83s (± 0.53%)+0.10s (+ 0.88%)11.73s11.91sp=0.045 n=6
Emit Time3.46s (± 3.99%)3.39s (± 3.87%)~3.26s3.55sp=0.199 n=6
Total Time17.66s (± 1.09%)17.71s (± 0.54%)~17.62s17.88sp=0.810 n=6
angular-1 - node (v18.15.0, x64)
Errors3756🔻+19 (+51.35%)~~p=0.001 n=6
Symbols948,493948,676+183 (+ 0.02%)~~p=0.001 n=6
Types411,005410,946-59 (- 0.01%)~~p=0.001 n=6
Memory used1,225,587k (± 0.00%)1,225,726k (± 0.00%)+139k (+ 0.01%)1,225,689k1,225,764kp=0.005 n=6
Parse Time8.04s (± 1.09%)8.06s (± 0.75%)~7.97s8.12sp=0.810 n=6
Bind Time2.30s (± 1.15%)2.29s (± 0.70%)~2.27s2.31sp=0.514 n=6
Check Time38.14s (± 0.50%)38.28s (± 0.30%)~38.13s38.46sp=0.261 n=6
Emit Time18.24s (± 0.87%)18.27s (± 0.66%)~18.12s18.43sp=0.872 n=6
Total Time66.72s (± 0.46%)66.91s (± 0.26%)~66.69s67.15sp=0.199 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,447,0812,447,081~~~p=1.000 n=6
Types898,548898,548~~~p=1.000 n=6
Memory used2,308,020k (± 0.00%)2,307,970k (± 0.00%)~2,307,874k2,308,028kp=0.078 n=6
Parse Time13.33s (± 0.32%)13.28s (± 0.58%)~13.21s13.42sp=0.172 n=6
Bind Time3.22s (± 0.55%)3.21s (± 0.60%)~3.18s3.23sp=0.867 n=6
Check Time110.33s (± 1.48%)110.94s (± 2.52%)~108.83s115.39sp=0.873 n=6
Emit Time0.42s (± 3.22%)0.42s (± 0.97%)~0.41s0.42sp=0.673 n=6
Total Time127.30s (± 1.28%)127.85s (± 2.23%)~125.77s132.30sp=1.000 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,229,3971,229,507+110 (+ 0.01%)~~p=0.001 n=6
Types267,085267,090+5 (+ 0.00%)~~p=0.001 n=6
Memory used2,973,403k (± 9.99%)2,730,433k (±14.62%)~2,364,997k3,096,396kp=0.298 n=6
Parse Time6.76s (± 1.04%)6.70s (± 1.64%)~6.57s6.81sp=0.575 n=6
Bind Time2.16s (± 1.33%)2.19s (± 1.02%)~2.16s2.22sp=0.146 n=6
Check Time42.79s (± 0.55%)42.74s (± 0.51%)~42.50s43.01sp=0.810 n=6
Emit Time3.49s (± 1.84%)3.40s (± 1.20%)-0.09s (- 2.48%)3.36s3.45sp=0.030 n=6
Total Time55.20s (± 0.38%)55.04s (± 0.59%)~54.69s55.48sp=0.471 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,229,3971,229,507+110 (+ 0.01%)~~p=0.001 n=6
Types267,085267,090+5 (+ 0.00%)~~p=0.001 n=6
Memory used2,917,723k (±12.86%)3,038,929k (± 9.76%)~2,433,028k3,160,414kp=0.936 n=6
Parse Time8.63s (± 1.70%)8.69s (± 1.00%)~8.56s8.83sp=1.000 n=6
Bind Time2.65s (± 1.23%)2.67s (± 1.00%)~2.64s2.70sp=0.629 n=6
Check Time53.30s (± 0.50%)53.23s (± 0.47%)~52.82s53.57sp=0.748 n=6
Emit Time4.33s (± 1.63%)4.27s (± 2.33%)~4.14s4.39sp=0.378 n=6
Total Time68.92s (± 0.63%)68.86s (± 0.54%)~68.23s69.38sp=0.575 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols263,074263,074~~~p=1.000 n=6
Types106,881106,881~~~p=1.000 n=6
Memory used441,342k (± 0.02%)441,275k (± 0.01%)~441,208k441,376kp=0.298 n=6
Parse Time3.56s (± 1.34%)3.56s (± 0.66%)~3.52s3.58sp=1.000 n=6
Bind Time1.31s (± 1.12%)1.30s (± 0.58%)~1.29s1.31sp=0.117 n=6
Check Time19.01s (± 0.38%)19.03s (± 0.36%)~18.92s19.11sp=0.687 n=6
Emit Time1.53s (± 0.68%)1.52s (± 0.54%)~1.51s1.53sp=0.546 n=6
Total Time25.41s (± 0.30%)25.41s (± 0.31%)~25.30s25.51sp=1.000 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors7071+1 (+ 1.43%)~~p=0.001 n=6
Symbols226,113225,982-131 (- 0.06%)~~p=0.001 n=6
Types94,48894,356-132 (- 0.14%)~~p=0.001 n=6
Memory used371,741k (± 0.02%)371,678k (± 0.04%)~371,528k371,872kp=0.688 n=6
Parse Time2.92s (± 0.35%)2.91s (± 0.74%)~2.88s2.94sp=0.141 n=6
Bind Time1.61s (± 1.21%)1.62s (± 1.53%)~1.59s1.66sp=0.625 n=6
Check Time16.47s (± 0.26%)16.49s (± 0.30%)~16.42s16.55sp=0.519 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time21.00s (± 0.30%)21.01s (± 0.33%)~20.94s21.10sp=0.809 n=6
vscode - node (v18.15.0, x64)
Errors39🔻+6 (+200.00%)~~p=0.001 n=6
Symbols3,273,4603,273,440-20 (- 0.00%)~~p=0.001 n=6
Types1,125,5951,125,568-27 (- 0.00%)~~p=0.001 n=6
Memory used3,347,378k (± 0.01%)3,347,558k (± 0.01%)~3,347,108k3,347,748kp=0.689 n=6
Parse Time14.55s (± 0.52%)14.55s (± 0.33%)~14.49s14.62sp=0.936 n=6
Bind Time4.84s (±13.24%)4.57s (± 0.64%)~4.52s4.60sp=0.222 n=6
Check Time88.19s (± 0.69%)89.03s (± 2.31%)~87.25s91.91sp=1.000 n=6
Emit Time28.25s (± 2.76%)27.50s (± 8.19%)~23.20s29.18sp=0.748 n=6
Total Time135.83s (± 1.27%)135.65s (± 1.59%)~133.75s139.29sp=0.575 n=6
webpack - node (v18.15.0, x64)
Errors029🔻+29 (+ ∞%)~~p=0.001 n=6
Symbols292,550292,930+380 (+ 0.13%)~~p=0.001 n=6
Types119,124119,856+732 (+ 0.61%)~~p=0.001 n=6
Memory used446,066k (± 0.02%)447,217k (± 0.03%)+1,151k (+ 0.26%)447,015k447,403kp=0.005 n=6
Parse Time4.09s (± 0.78%)4.09s (± 1.04%)~4.05s4.16sp=0.685 n=6
Bind Time1.79s (± 0.99%)1.79s (± 1.12%)~1.76s1.81sp=0.744 n=6
Check Time18.80s (± 0.56%)19.07s (± 0.31%)+0.27s (+ 1.42%)18.99s19.13sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.68s (± 0.36%)24.94s (± 0.22%)+0.27s (+ 1.07%)24.85s25.00sp=0.005 n=6
xstate-main - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols555,449555,449~~~p=1.000 n=6
Types186,146186,146~~~p=1.000 n=6
Memory used494,548k (± 0.04%)494,569k (± 0.01%)~494,516k494,603kp=0.936 n=6
Parse Time3.43s (± 0.60%)3.43s (± 0.55%)~3.40s3.45sp=1.000 n=6
Bind Time1.21s (± 1.53%)1.22s (± 0.42%)~1.21s1.22sp=1.000 n=6
Check Time19.84s (± 2.45%)19.69s (± 0.33%)~19.62s19.80sp=0.470 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.48s (± 1.98%)24.34s (± 0.24%)~24.25s24.42sp=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

Ron Buckton (@rbuckton) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60150/merge:

Something interesting changed - please have a look.

Details

actualbudget/actual

1 of 5 projects failed to build with the old tsc and were ignored

tsconfig.json

packages/loot-core/tsconfig.api.json

ag-grid/ag-grid

17 of 31 projects failed to build with the old tsc and were ignored

external/ag-shared/tsconfig.watch.json

external/ag-shared/tsconfig.types.watch.json

blakeblackshear/frigate

web/tsconfig.json

bluesky-social/social-app

3 of 7 projects failed to build with the old tsc and were ignored

bskylink/tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'Uint8Array<ArrayBufferLike>'.

desktop/desktop

1 of 5 projects failed to build with the old tsc and were ignored

tsconfig.json

Dokploy/dokploy

2 of 6 projects failed to build with the old tsc and were ignored

packages/server/tsconfig.server.json

packages/server/tsconfig.json

apps/dokploy/tsconfig.server.json

apps/dokploy/tsconfig.json

Eugeny/tabby

11 of 29 projects failed to build with the old tsc and were ignored

tabby-web-demo/tsconfig.json

tabby-web/tsconfig.json

tabby-terminal/tsconfig.json

tabby-ssh/tsconfig.json

tabby-settings/tsconfig.json

tabby-plugin-manager/tsconfig.json

tabby-local/tsconfig.json

tabby-linkifier/tsconfig.json

tabby-electron/tsconfig.json

tabby-core/tsconfig.typings.json

tabby-core/tsconfig.json

tabby-community-color-schemes/tsconfig.json

app/tsconfig.main.json

app/tsconfig.json

FlowiseAI/Flowise

1 of 3 projects failed to build with the old tsc and were ignored

packages/components/tsconfig.json

FuelLabs/fuels-ts

34 of 55 projects failed to build with the old tsc and were ignored

packages/crypto/tsconfig.dts.json

packages/abi-typegen/tsconfig.json

packages/abi-typegen/tsconfig.dts.json

gitpod-io/gitpod

12 of 20 projects failed to build with the old tsc and were ignored

components/gitpod-db/tsconfig.json

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) Here are some more interesting changes from running the top 400 repos suite

Details

hoarder-app/hoarder

3 of 17 projects failed to build with the old tsc and were ignored

packages/trpc/tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | Stream | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>'.

packages/shared-react/tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | Stream | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>'.

packages/shared/tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView> | Stream'.

packages/e2e_tests/tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | Stream | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>'.

apps/web/tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | Stream | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>'.

apps/cli/tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | Stream | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>'.

honojs/hono

7 of 8 projects failed to build with the old tsc and were ignored

tsconfig.json

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) Here are some more interesting changes from running the top 400 repos suite

Details

jupyterlab/jupyterlab

48 of 59 projects failed to build with the old tsc and were ignored

packages/ui-components/examples/simple-windowed-list/tsconfig.json

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) Here are some more interesting changes from running the top 400 repos suite

Details

labring/FastGPT

4 of 9 projects failed to build with the old tsc and were ignored

projects/sandbox/tsconfig.json

projects/sandbox/tsconfig.build.json

labring/sealos

19 of 23 projects failed to build with the old tsc and were ignored

extensions/ide/vscode/devbox/tsconfig.json

lerna/lerna

1 of 42 projects failed to build with the old tsc and were ignored

tools/scripts/tsconfig.scripts.json

tools/scripts/tsconfig.e2e.json

mendableai/firecrawl

apps/api/tsconfig.json

microsoft/vscode

5 of 55 projects failed to build with the old tsc and were ignored

src/tsconfig.tsec.json

src/tsconfig.monaco.json

extensions/vscode-test-resolver/tsconfig.json

extensions/vscode-api-tests/tsconfig.json

extensions/typescript-language-features/tsconfig.json

extensions/tunnel-forwarding/tsconfig.json

extensions/ipynb/tsconfig.json

extensions/html-language-features/client/tsconfig.json

extensions/git/tsconfig.json

extensions/emmet/tsconfig.json

extensions/debug-auto-launch/tsconfig.json

extensions/css-language-features/client/tsconfig.json

build/tsconfig.build.json

neoclide/coc.nvim

tsconfig.json

nexe/nexe

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

openai-translator/openai-translator

tsconfig.json

peers/peerjs

tsconfig.json

pubkey/rxdb

9 of 11 projects failed to build with the old tsc and were ignored

tsconfig.json

config/tsconfig.types.json

puppeteer/puppeteer

7 of 14 projects failed to build with the old tsc and were ignored

packages/testserver/tsconfig.json

shadcn-ui/ui

20 of 26 projects failed to build with the old tsc and were ignored

packages/shadcn/tsconfig.json

socketio/socket.io

12 of 32 projects failed to build with the old tsc and were ignored

packages/engine.io/tsconfig.json

subquery/subql

4 of 6 projects failed to build with the old tsc and were ignored

packages/query/tsconfig.json

Tonejs/Tone.js

tsconfig.json

upscayl/upscayl

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | Stream | ArrayBufferView | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>'.

uuidjs/uuid

1 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2322: Type 'Uint8Array<ArrayBufferLike>' is not assignable to type 'Uint8Array<ArrayBuffer>'.

tsconfig.cjs.json

  • error TS2322: Type 'Uint8Array<ArrayBufferLike>' is not assignable to type 'Uint8Array<ArrayBuffer>'.

video-dev/hls.js

tsconfig.json

VSCodeVim/Vim

tsconfig.json

@rbuckton

Copy link
Copy Markdown
Contributor
  • effect - These two failures seem to be due to how Match.instanceOf determines the instance type of a constructor function. The constructor type used is only able to pick the first overload of the overload list, which results in the type Uint8Array<ArrayBuffer>. effect would need to update their tests.
  • puppeteer - These are due to out of date @types/node definitions.
  • webpack - These seem to be due to out of date @types/node definitions referenced in the yarn.lock file.
  • xterm - Also due to out of date @types/node defininitions in both package.json and yarn.lock.
  • actualbudget/actual - Looks to be due to out of date @types/node definitions in yarn.lock.

With the exception of effect, most of the reported issues I've reviewed so far seem to be due to out-of-date @types/node definitions which would need to be addressed by the individual project maintainers. I'm still reviewing the various failures, however.

@rbuckton

Copy link
Copy Markdown
Contributor

This did not make the cut for 5.8, but should be in 5.9. I plan to merge to main once we release the 5.8 RC and main transitions to 5.9 work.

@rbucktonRon Buckton (rbuckton) added the Breaking Change Would introduce errors in existing code label Feb 24, 2025
@rbuckton
Ron Buckton (rbuckton) merged commit 8ae98d0 into microsoft:mainFeb 24, 2025
@petamoriken
Kenta Moriuchi (petamoriken) deleted the fix/arraybuffer-tostringtag branch February 25, 2025 01:16
Florian Gößler (FGoessler) added a commit to prisma/prisma that referenced this pull request Feb 25, 2025
… TS 5.9 due to microsoft/TypeScript#60150 (#26437)
microsoft/TypeScript#60150 introduced a breaking
change to the type behaviour of string literals and ArrayBuffers. This
requires a `@types/node` update to get the latest fixed types from
DefinitelyTyped/DefinitelyTyped#70694.
We're using `@types/node@18.19.76` now.
@jakebailey

Jake Bailey (jakebailey) commented Feb 27, 2025

Copy link
Copy Markdown
Member

The DT results were too big to display, and I guess that means we might not have noticed them? Seems like DT is quite broken right now. (Note the refs above too).

@dasa

Copy link
Copy Markdown

I'm also seeing issues caused by this in 5.9.0-beta as described in #62083.

@jakebailey

Copy link
Copy Markdown
Member

Please file an issue; closed PRs are not the best place to discuss issues.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Breaking ChangeWould introduce errors in existing codeFor Milestone BugPRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use string literal type in ArrayBuffer's Symbol.toStringTag

7 participants

@petamoriken@jakebailey@typescript-bot@rbuckton@dasa@sandersn@andrewbranch