Skip to content

Move DOM.Iterable contents to DOM, make DOM reference ES6/ES2015 #62111

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jakebailey
Copy link
Member

Related #62025
Related #54500

This should actually happen in the DOM generator repo, but testing here first with a manual change.

A negative side effect of this is that the default lib (only used when there's no lib or target set) used to reference ES5/DOM, but now DOM requires ES6, so basically the default changes. This would be fine if we simply declared that the default lib weas now ES6, which I think we want to do anyway.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jul 23, 2025
@jakebailey
Copy link
Member Author

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 23, 2025

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

Command Status Results
pack this ✅ Started ✅ Results
test top400 ✅ Started 👀 Results
user test this ✅ Started ✅ Results
run dt ✅ Started 👀 Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 23, 2025

Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/165729/artifacts?artifactName=tgz&fileId=850BA94CBF29B1799E021F58C6D50FAEA15105D55C1C30A291718B1340BEEDF502&fileName=/typescript-5.9.0-insiders.20250723.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.9.0-pr-62111-2".;

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

There were interesting changes:

Branch only errors:

Package: es6-collections
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/es6-collections/index.d.ts
  16:11  error  TypeScript@local compile error: 
Duplicate identifier 'IteratorResult'                                                                                                                          @definitelytyped/expect
  41:5   error  TypeScript@local compile error: 
All declarations of 'size' must have identical modifiers                                                                                                       @definitelytyped/expect
  47:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  61:5   error  TypeScript@local compile error: 
All declarations of 'size' must have identical modifiers                                                                                                       @definitelytyped/expect
  67:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  83:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  83:5   error  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'prototype' must be of type 'WeakMap<object, any>', but here has type 'WeakMap<any, any>'  @definitelytyped/expect
  96:23  error  TypeScript@local compile error: 
Type 'T' does not satisfy the constraint 'object'                                                                                                              @definitelytyped/expect
  97:47  error  TypeScript@local compile error: 
Type 'T' does not satisfy the constraint 'object'                                                                                                              @definitelytyped/expect
  98:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  98:5   error  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'prototype' must be of type 'WeakSet<object>', but here has type 'WeakSet<any>'            @definitelytyped/expect

✖ 11 problems (11 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.32_typescript@5.9.0-dev.20250723/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.32_typescript@5.9.0-dev.20250723/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

Package: es6-shim
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/es6-shim/index.d.ts
    1:11  error  TypeScript@local compile error: 
Duplicate identifier 'IteratorResult'                                                                                                                          @definitelytyped/expect
  240:5   error  TypeScript@local compile error: 
All declarations of 'EPSILON' must have identical modifiers                                                                                                    @definitelytyped/expect
  275:5   error  TypeScript@local compile error: 
All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers                                                                                           @definitelytyped/expect
  282:5   error  TypeScript@local compile error: 
All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers                                                                                           @definitelytyped/expect
  338:5   error  TypeScript@local compile error: 
All declarations of 'flags' must have identical modifiers                                                                                                      @definitelytyped/expect
  502:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  567:5   error  TypeScript@local compile error: 
All declarations of 'size' must have identical modifiers                                                                                                       @definitelytyped/expect
  576:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  587:5   error  TypeScript@local compile error: 
All declarations of 'size' must have identical modifiers                                                                                                       @definitelytyped/expect
  597:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  612:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  612:5   error  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'prototype' must be of type 'WeakMap<object, any>', but here has type 'WeakMap<any, any>'  @definitelytyped/expect
  624:23  error  TypeScript@local compile error: 
Type 'T' does not satisfy the constraint 'object'                                                                                                              @definitelytyped/expect
  625:48  error  TypeScript@local compile error: 
Type 'T' does not satisfy the constraint 'object'                                                                                                              @definitelytyped/expect
  626:5   error  TypeScript@local compile error: 
All declarations of 'prototype' must have identical modifiers                                                                                                  @definitelytyped/expect
  626:5   error  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'prototype' must be of type 'WeakSet<object>', but here has type 'WeakSet<any>'            @definitelytyped/expect

✖ 16 problems (16 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.32_typescript@5.9.0-dev.20250723/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.32_typescript@5.9.0-dev.20250723/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/62111/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,370 62,370 ~ ~ ~ p=1.000 n=6
Types 50,386 50,386 ~ ~ ~ p=1.000 n=6
Memory used 192,994k (± 0.09%) 194,258k (± 0.91%) ~ 192,910k 196,553k p=0.173 n=6
Parse Time 1.31s (± 0.48%) 1.30s (± 0.69%) ~ 1.29s 1.31s p=0.070 n=6
Bind Time 0.73s 0.73s ~ ~ ~ p=1.000 n=6
Check Time 9.73s (± 0.31%) 9.75s (± 0.22%) ~ 9.72s 9.78s p=0.418 n=6
Emit Time 2.74s (± 0.48%) 2.74s (± 1.00%) ~ 2.71s 2.78s p=0.868 n=6
Total Time 14.51s (± 0.16%) 14.52s (± 0.22%) ~ 14.47s 14.55s p=0.570 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,914 948,717 -197 (- 0.02%) ~ ~ p=0.001 n=6
Types 410,884 410,884 ~ ~ ~ p=1.000 n=6
Memory used 1,226,383k (± 0.00%) 1,226,332k (± 0.00%) ~ 1,226,267k 1,226,372k p=0.128 n=6
Parse Time 6.51s (± 0.49%) 6.52s (± 1.01%) ~ 6.45s 6.62s p=0.872 n=6
Bind Time 1.87s (± 0.28%) 1.88s (± 0.27%) ~ 1.87s 1.88s p=0.311 n=6
Check Time 32.01s (± 0.25%) 32.05s (± 0.54%) ~ 31.84s 32.30s p=0.687 n=6
Emit Time 14.80s (± 0.89%) 14.79s (± 0.41%) ~ 14.70s 14.86s p=0.471 n=6
Total Time 55.20s (± 0.20%) 55.24s (± 0.37%) ~ 54.92s 55.45s p=0.521 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,542,818 2,542,538 -280 (- 0.01%) ~ ~ p=0.001 n=6
Types 900,360 900,360 ~ ~ ~ p=1.000 n=6
Memory used 2,829,317k (± 0.01%) 2,829,140k (± 0.01%) ~ 2,828,874k 2,829,347k p=0.173 n=6
Parse Time 8.74s (± 0.27%) 8.75s (± 0.28%) ~ 8.72s 8.79s p=0.295 n=6
Bind Time 2.25s (± 0.33%) 2.25s (± 0.37%) ~ 2.25s 2.27s p=0.652 n=6
Check Time 85.86s (± 0.43%) 85.86s (± 0.80%) ~ 84.93s 86.97s p=0.810 n=6
Emit Time 1.32s (±84.36%) 0.99s (±96.40%) ~ 0.30s 2.37s p=0.624 n=6
Total Time 98.17s (± 1.15%) 97.87s (± 1.46%) ~ 96.27s 100.07s p=0.575 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,227,048 1,227,048 ~ ~ ~ p=1.000 n=6
Types 267,470 267,470 ~ ~ ~ p=1.000 n=6
Memory used 2,423,932k (± 6.14%) 2,667,832k (±13.45%) ~ 2,362,968k 3,095,006k p=0.173 n=6
Parse Time 5.22s (± 1.09%) 5.27s (± 0.94%) ~ 5.21s 5.33s p=0.128 n=6
Bind Time 1.78s (± 1.36%) 1.78s (± 1.16%) ~ 1.74s 1.80s p=1.000 n=6
Check Time 35.25s (± 0.61%) 35.43s (± 0.83%) ~ 35.05s 35.84s p=0.335 n=6
Emit Time 3.00s (± 0.74%) 2.96s (± 2.03%) ~ 2.86s 3.02s p=0.295 n=6
Total Time 45.27s (± 0.41%) 45.44s (± 0.67%) ~ 45.09s 45.88s p=0.378 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,227,048 1,227,048 ~ ~ ~ p=1.000 n=6
Types 267,470 267,470 ~ ~ ~ p=1.000 n=6
Memory used 2,797,186k (±14.25%) 2,676,014k (±14.05%) ~ 2,431,948k 3,161,939k p=1.000 n=6
Parse Time 6.81s (± 1.38%) 6.76s (± 1.56%) ~ 6.68s 6.92s p=0.575 n=6
Bind Time 2.23s (± 2.58%) 2.20s (± 2.61%) ~ 2.11s 2.26s p=0.377 n=6
Check Time 42.93s (± 1.05%) 42.82s (± 0.54%) ~ 42.55s 43.03s p=0.471 n=6
Emit Time 3.54s (± 2.51%) 3.56s (± 2.92%) ~ 3.45s 3.73s p=0.748 n=6
Total Time 55.50s (± 0.96%) 55.36s (± 0.53%) ~ 54.93s 55.62s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,548 262,548 ~ ~ ~ p=1.000 n=6
Types 107,156 107,156 ~ ~ ~ p=1.000 n=6
Memory used 441,936k (± 0.02%) 441,918k (± 0.02%) ~ 441,804k 441,999k p=0.689 n=6
Parse Time 4.40s (± 1.04%) 4.36s (± 0.43%) ~ 4.33s 4.38s p=0.077 n=6
Bind Time 1.63s (± 0.67%) 1.62s (± 0.50%) ~ 1.61s 1.63s p=0.383 n=6
Check Time 23.46s (± 0.36%) 23.41s (± 0.29%) ~ 23.33s 23.53s p=0.423 n=6
Emit Time 1.91s (± 0.39%) 1.89s (± 1.04%) ~ 1.86s 1.91s p=0.054 n=6
Total Time 31.40s (± 0.39%) 31.28s (± 0.20%) ~ 31.18s 31.35s p=0.149 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 71 ~ ~ ~ p=1.000 n=6
Symbols 225,367 225,367 ~ ~ ~ p=1.000 n=6
Types 94,290 94,290 ~ ~ ~ p=1.000 n=6
Memory used 371,134k (± 0.01%) 371,108k (± 0.01%) ~ 371,068k 371,181k p=0.575 n=6
Parse Time 2.90s (± 1.36%) 2.88s (± 0.92%) ~ 2.84s 2.91s p=0.574 n=6
Bind Time 1.60s (± 0.88%) 1.60s (± 1.55%) ~ 1.57s 1.64s p=0.746 n=6
Check Time 16.43s (± 0.36%) 16.46s (± 0.21%) ~ 16.40s 16.50s p=0.520 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.92s (± 0.29%) 20.94s (± 0.28%) ~ 20.87s 21.01s p=0.936 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,530,678 3,530,396 -282 (- 0.01%) ~ ~ p=0.001 n=6
Types 1,191,846 1,191,846 ~ ~ ~ p=1.000 n=6
Memory used 3,579,300k (± 0.00%) 3,579,141k (± 0.00%) -159k (- 0.00%) 3,579,033k 3,579,203k p=0.013 n=6
Parse Time 15.13s (± 0.46%) 15.21s (± 0.74%) ~ 15.06s 15.35s p=0.192 n=6
Bind Time 4.90s (± 0.29%) 5.14s (±12.65%) ~ 4.86s 6.47s p=0.295 n=6
Check Time 101.02s (± 1.65%) 100.41s (± 4.12%) ~ 95.95s 105.91s p=0.378 n=6
Emit Time 33.05s (±17.79%) 30.63s (± 1.00%) ~ 30.25s 31.00s p=0.689 n=6
Total Time 154.09s (± 4.08%) 151.40s (± 2.53%) ~ 147.85s 156.77s p=0.298 n=6
webpack - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 320,544 321,546 +1,002 (+ 0.31%) ~ ~ p=0.001 n=6
Types 140,017 140,553 +536 (+ 0.38%) ~ ~ p=0.001 n=6
Memory used 476,545k (± 0.04%) 477,783k (± 0.01%) +1,238k (+ 0.26%) 477,692k 477,857k p=0.005 n=6
Parse Time 4.29s (± 0.34%) 4.30s (± 0.61%) ~ 4.26s 4.33s p=0.291 n=6
Bind Time 1.78s (± 1.35%) 1.79s (± 0.76%) ~ 1.78s 1.81s p=0.292 n=6
Check Time 20.56s (± 0.58%) 20.67s (± 0.70%) ~ 20.45s 20.80s p=0.199 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 26.64s (± 0.45%) 26.76s (± 0.55%) ~ 26.57s 26.91s p=0.108 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 662,663 663,032 +369 (+ 0.06%) ~ ~ p=0.001 n=6
Types 197,635 197,637 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 569,753k (± 0.03%) 570,525k (± 0.03%) +772k (+ 0.14%) 570,334k 570,663k p=0.005 n=6
Parse Time 4.28s (± 0.71%) 4.27s (± 0.65%) ~ 4.23s 4.31s p=0.570 n=6
Bind Time 1.33s (± 1.46%) 1.33s (± 0.78%) ~ 1.31s 1.34s p=0.512 n=6
Check Time 20.03s (± 1.85%) 20.13s (± 1.82%) ~ 19.84s 20.60s p=0.229 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 25.64s (± 1.44%) 25.73s (± 1.54%) ~ 25.41s 26.24s p=0.378 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos with tsc comparing main and refs/pull/62111/merge:

Something interesting changed - please have a look.

Details

BuilderIO/mitosis

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

packages/core/tsconfig.build.json

react-bootstrap/react-bootstrap

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

tsconfig.json

test/tsconfig.json

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

Successfully merging this pull request may close these issues.

2 participants