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

feat(51086): satisfies support in JSDoc #51753

Merged
merged 26 commits into from
Jan 17, 2023
Merged

Conversation

a-tarasyuk
Copy link
Contributor

Fixes #51086

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Dec 5, 2022
@DanielRosenwasser
Copy link
Member

@typescript-bot pack this
@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 6, 2022

Heya @DanielRosenwasser, I've started to run the abridged perf test suite on this PR at 59b288f. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 6, 2022

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 59b288f. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 6, 2022

Hey @DanielRosenwasser, 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/139777/artifacts?artifactName=tgz&fileId=B223ACDEB83D122D053BD5B40F019EFCDFB6B130B6F8D1C7352743A53849F7C102&fileName=/typescript-5.0.0-insiders.20221206.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/[email protected]".;

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..51753

Metric main 51753 Delta Best Worst
Angular - node (v16.17.1, x64)
Memory used 340,498k (± 0.02%) 340,539k (± 0.02%) +42k (+ 0.01%) 340,302k 340,778k
Parse Time 1.86s (± 0.42%) 1.87s (± 0.47%) +0.01s (+ 0.59%) 1.86s 1.89s
Bind Time 0.64s (± 0.87%) 0.64s (± 0.46%) 0.00s ( 0.00%) 0.64s 0.65s
Check Time 5.15s (± 0.47%) 5.13s (± 0.56%) -0.02s (- 0.41%) 5.09s 5.23s
Emit Time 5.08s (± 0.94%) 5.10s (± 0.54%) +0.02s (+ 0.37%) 5.03s 5.17s
Total Time 12.73s (± 0.53%) 12.74s (± 0.32%) +0.01s (+ 0.07%) 12.66s 12.82s
Compiler-Unions - node (v16.17.1, x64)
Memory used 188,370k (± 0.67%) 187,686k (± 0.60%) -684k (- 0.36%) 186,638k 190,210k
Parse Time 0.79s (± 0.47%) 0.79s (± 0.78%) +0.00s (+ 0.51%) 0.78s 0.80s
Bind Time 0.42s (± 0.82%) 0.42s (± 1.07%) +0.00s (+ 0.24%) 0.41s 0.43s
Check Time 6.06s (± 0.82%) 6.05s (± 0.85%) -0.01s (- 0.13%) 5.96s 6.18s
Emit Time 1.94s (± 0.90%) 1.94s (± 0.66%) +0.01s (+ 0.36%) 1.91s 1.96s
Total Time 9.20s (± 0.66%) 9.20s (± 0.66%) -0.00s (- 0.00%) 9.08s 9.31s
Monaco - node (v16.17.1, x64)
Memory used 319,784k (± 0.01%) 319,760k (± 0.01%) -23k (- 0.01%) 319,707k 319,796k
Parse Time 1.40s (± 1.01%) 1.40s (± 0.42%) +0.00s (+ 0.29%) 1.39s 1.42s
Bind Time 0.59s (± 1.43%) 0.60s (± 0.83%) +0.00s (+ 0.85%) 0.59s 0.61s
Check Time 4.84s (± 0.54%) 4.85s (± 0.50%) +0.01s (+ 0.23%) 4.80s 4.90s
Emit Time 2.71s (± 0.90%) 2.73s (± 0.84%) +0.02s (+ 0.66%) 2.68s 2.78s
Total Time 9.54s (± 0.44%) 9.58s (± 0.43%) +0.04s (+ 0.44%) 9.48s 9.69s
TFS - node (v16.17.1, x64)
Memory used 282,307k (± 0.00%) 282,276k (± 0.01%) -30k (- 0.01%) 282,233k 282,303k
Parse Time 1.15s (± 1.13%) 1.16s (± 1.02%) +0.01s (+ 0.96%) 1.13s 1.19s
Bind Time 0.63s (± 4.92%) 0.64s (± 5.72%) +0.00s (+ 0.63%) 0.57s 0.70s
Check Time 4.75s (± 0.58%) 4.77s (± 0.33%) +0.02s (+ 0.46%) 4.72s 4.79s
Emit Time 2.77s (± 1.31%) 2.77s (± 1.70%) -0.00s (- 0.00%) 2.69s 2.87s
Total Time 9.29s (± 0.67%) 9.33s (± 0.92%) +0.04s (+ 0.39%) 9.19s 9.50s
material-ui - node (v16.17.1, x64)
Memory used 435,321k (± 0.00%) 435,306k (± 0.00%) -15k (- 0.00%) 435,265k 435,331k
Parse Time 1.61s (± 0.55%) 1.62s (± 0.77%) +0.01s (+ 0.87%) 1.60s 1.65s
Bind Time 0.50s (± 0.68%) 0.50s (± 0.98%) +0.00s (+ 0.20%) 0.49s 0.51s
Check Time 11.77s (± 0.76%) 11.84s (± 0.90%) +0.07s (+ 0.57%) 11.62s 12.15s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 13.89s (± 0.63%) 13.96s (± 0.78%) +0.08s (+ 0.55%) 13.76s 14.29s
xstate - node (v16.17.1, x64)
Memory used 516,067k (± 0.02%) 516,112k (± 0.01%) +45k (+ 0.01%) 516,011k 516,313k
Parse Time 2.25s (± 0.18%) 2.27s (± 0.42%) +0.02s (+ 0.76%) 2.25s 2.29s
Bind Time 0.83s (± 1.99%) 0.83s (± 0.94%) -0.00s (- 0.36%) 0.82s 0.85s
Check Time 1.36s (± 0.78%) 1.36s (± 0.82%) 0.00s ( 0.00%) 1.34s 1.38s
Emit Time 0.06s (± 0.00%) 0.06s (± 0.00%) 0.00s ( 0.00%) 0.06s 0.06s
Total Time 4.50s (± 0.46%) 4.51s (± 0.40%) +0.01s (+ 0.20%) 4.48s 4.55s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current 51753 10
Baseline main 10

Developer Information:

Download Benchmark

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 16, 2022

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 7d823ae. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 16, 2022

Hey @DanielRosenwasser, 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/140624/artifacts?artifactName=tgz&fileId=8FDCD5FB7CADB661C4A0D07B8E2D6E6DE6E5355F6DA223FD860F7C1DA8FD722702&fileName=/typescript-5.0.0-insiders.20221216.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/[email protected]".;

@a-tarasyuk
Copy link
Contributor Author

a-tarasyuk commented Jan 9, 2023

@DanielRosenwasser Could you take a look at these changes? I want to be sure about

We would like @satisfies to also work in declaration positions - enforce the assignability check on, and also contextually type, the initializer expression(s?).

@DanielRosenwasser
Copy link
Member

I think the specific use case we had in mind was a @satisfies tag before the declaration itself.

/** @satisfies {{ f: (x: string) => string }} */
let obj1 = { f: s => s.toLowerCase() }; // should work

/** @satisfies {{ f: (x: string) => string }} */
let obj2 = { g: "oops" }; // should error

similar to how an @type tag can be placed.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..51753
Metric main 51753 Delta Best Worst
Angular - node (v18.10.0, x64)
Memory used 372,365k (± 0.01%) 372,419k (± 0.01%) +55k (+ 0.01%) 372,354k 372,472k
Parse Time 3.93s (± 1.70%) 3.93s (± 0.62%) -0.01s (- 0.20%) 3.90s 3.97s
Bind Time 1.20s (± 1.13%) 1.20s (± 0.97%) -0.00s (- 0.17%) 1.18s 1.21s
Check Time 8.66s (± 0.40%) 8.66s (± 0.75%) +0.00s (+ 0.01%) 8.58s 8.76s
Emit Time 7.52s (± 0.35%) 7.54s (± 0.80%) +0.02s (+ 0.24%) 7.42s 7.59s
Total Time 21.32s (± 0.48%) 21.32s (± 0.43%) +0.01s (+ 0.04%) 21.20s 21.45s
Compiler-Unions - node (v18.10.0, x64)
Memory used 200,328k (± 1.49%) 202,053k (± 1.46%) +1,724k (+ 0.86%) 198,246k 204,165k
Parse Time 1.65s (± 1.38%) 1.65s (± 1.96%) +0.01s (+ 0.47%) 1.61s 1.69s
Bind Time 0.79s (± 0.52%) 0.79s (± 0.22%) -0.00s (- 0.25%) 0.79s 0.79s
Check Time 9.52s (± 0.47%) 9.43s (± 1.11%) -0.09s (- 0.91%) 9.30s 9.62s
Emit Time 2.78s (± 0.99%) 2.75s (± 1.26%) -0.03s (- 0.93%) 2.72s 2.81s
Total Time 14.74s (± 0.37%) 14.63s (± 1.05%) -0.11s (- 0.72%) 14.43s 14.87s
Monaco - node (v18.10.0, x64)
Memory used 354,135k (± 0.01%) 354,143k (± 0.01%) +8k (+ 0.00%) 354,084k 354,212k
Parse Time 2.94s (± 0.67%) 2.96s (± 0.32%) +0.01s (+ 0.51%) 2.94s 2.97s
Bind Time 1.04s (± 1.09%) 1.05s (± 1.18%) +0.01s (+ 1.13%) 1.04s 1.07s
Check Time 7.23s (± 0.58%) 7.22s (± 0.35%) -0.01s (- 0.11%) 7.18s 7.25s
Emit Time 4.31s (± 0.90%) 4.28s (± 0.75%) -0.04s (- 0.87%) 4.24s 4.33s
Total Time 15.53s (± 0.57%) 15.51s (± 0.33%) -0.02s (- 0.12%) 15.47s 15.61s
TFS - node (v18.10.0, x64)
Memory used 310,213k (± 0.01%) 310,204k (± 0.01%) -9k (- 0.00%) 310,177k 310,223k
Parse Time 2.28s (± 1.70%) 2.26s (± 0.70%) -0.02s (- 0.91%) 2.24s 2.29s
Bind Time 1.16s (± 1.44%) 1.15s (± 0.74%) -0.01s (- 0.83%) 1.15s 1.17s
Check Time 6.81s (± 0.49%) 6.85s (± 0.52%) +0.04s (+ 0.55%) 6.80s 6.89s
Emit Time 3.92s (± 0.40%) 3.96s (± 0.59%) +0.04s (+ 1.09%) 3.93s 3.99s
Total Time 14.18s (± 0.55%) 14.23s (± 0.33%) +0.04s (+ 0.31%) 14.17s 14.29s
material-ui - node (v18.10.0, x64)
Memory used 485,231k (± 0.01%) 485,272k (± 0.01%) +41k (+ 0.01%) 485,192k 485,344k
Parse Time 3.53s (± 0.43%) 3.54s (± 0.32%) +0.01s (+ 0.38%) 3.53s 3.55s
Bind Time 0.96s (± 0.82%) 0.97s (± 1.27%) +0.00s (+ 0.52%) 0.96s 0.99s
Check Time 16.94s (± 0.86%) 16.84s (± 0.30%) -0.10s (- 0.57%) 16.75s 16.90s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 21.43s (± 0.69%) 21.35s (± 0.33%) -0.08s (- 0.39%) 21.22s 21.42s
xstate - node (v18.10.0, x64)
Memory used 570,282k (± 0.01%) 570,407k (± 0.03%) +125k (+ 0.02%) 570,193k 570,611k
Parse Time 4.44s (± 0.53%) 4.46s (± 0.45%) +0.02s (+ 0.34%) 4.43s 4.48s
Bind Time 1.70s (± 1.04%) 1.71s (± 0.50%) +0.01s (+ 0.65%) 1.70s 1.72s
Check Time 2.60s (± 1.01%) 2.60s (± 0.52%) -0.00s (- 0.10%) 2.58s 2.62s
Emit Time 0.08s (± 0.21%) 0.08s (± 0.17%) -0.00s (- 0.03%) 0.08s 0.08s
Total Time 8.82s (± 0.38%) 8.85s (± 0.12%) +0.02s (+ 0.27%) 8.84s 8.86s
Angular - node (v16.17.1, x64)
Memory used 371,720k (± 0.01%) 371,749k (± 0.01%) +29k (+ 0.01%) 371,697k 371,790k
Parse Time 4.13s (± 0.42%) 4.11s (± 0.38%) -0.02s (- 0.55%) 4.09s 4.13s
Bind Time 1.26s (± 0.27%) 1.26s (± 1.00%) +0.00s (+ 0.07%) 1.25s 1.28s
Check Time 9.31s (± 0.54%) 9.32s (± 0.49%) +0.01s (+ 0.13%) 9.28s 9.39s
Emit Time 7.96s (± 0.42%) 7.99s (± 0.56%) +0.03s (+ 0.33%) 7.96s 8.08s
Total Time 22.67s (± 0.35%) 22.68s (± 0.47%) +0.01s (+ 0.07%) 22.61s 22.88s
Compiler-Unions - node (v16.17.1, x64)
Memory used 200,510k (± 0.65%) 199,926k (± 0.09%) -584k (- 0.29%) 199,589k 200,082k
Parse Time 1.81s (± 0.48%) 1.81s (± 0.52%) -0.01s (- 0.35%) 1.80s 1.83s
Bind Time 0.85s (± 0.90%) 0.84s (± 0.62%) -0.01s (- 0.75%) 0.83s 0.85s
Check Time 10.08s (± 0.34%) 10.04s (± 0.62%) -0.03s (- 0.33%) 9.99s 10.13s
Emit Time 3.02s (± 3.44%) 3.01s (± 3.28%) -0.01s (- 0.33%) 2.96s 3.21s
Total Time 15.76s (± 0.58%) 15.71s (± 0.77%) -0.05s (- 0.32%) 15.61s 15.94s
Monaco - node (v16.17.1, x64)
Memory used 353,473k (± 0.01%) 353,458k (± 0.01%) -15k (- 0.00%) 353,382k 353,520k
Parse Time 3.16s (± 0.43%) 3.17s (± 0.83%) +0.00s (+ 0.08%) 3.13s 3.20s
Bind Time 1.11s (± 1.59%) 1.12s (± 1.19%) +0.00s (+ 0.43%) 1.10s 1.13s
Check Time 7.85s (± 0.14%) 7.85s (± 0.44%) +0.00s (+ 0.01%) 7.79s 7.88s
Emit Time 4.47s (± 0.93%) 4.50s (± 0.58%) +0.03s (+ 0.69%) 4.47s 4.54s
Total Time 16.59s (± 0.26%) 16.63s (± 0.41%) +0.04s (+ 0.25%) 16.53s 16.73s
TFS - node (v16.17.1, x64)
Memory used 309,555k (± 0.00%) 309,565k (± 0.00%) +10k (+ 0.00%) 309,549k 309,580k
Parse Time 2.67s (± 1.67%) 2.65s (± 0.90%) -0.02s (- 0.75%) 2.61s 2.68s
Bind Time 1.05s (± 1.43%) 1.05s (± 1.73%) -0.00s (- 0.14%) 1.03s 1.07s
Check Time 7.41s (± 0.46%) 7.41s (± 0.59%) +0.01s (+ 0.09%) 7.37s 7.47s
Emit Time 4.23s (± 0.23%) 4.21s (± 0.63%) -0.02s (- 0.41%) 4.17s 4.24s
Total Time 15.35s (± 0.33%) 15.33s (± 0.31%) -0.02s (- 0.15%) 15.25s 15.38s
material-ui - node (v16.17.1, x64)
Memory used 484,500k (± 0.00%) 484,528k (± 0.01%) +29k (+ 0.01%) 484,471k 484,562k
Parse Time 3.68s (± 0.47%) 3.67s (± 0.34%) -0.01s (- 0.27%) 3.65s 3.69s
Bind Time 1.01s (± 0.88%) 1.00s (± 1.13%) -0.01s (- 1.12%) 0.98s 1.02s
Check Time 17.91s (± 0.33%) 17.95s (± 1.02%) +0.04s (+ 0.22%) 17.78s 18.30s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.61s (± 0.30%) 22.62s (± 0.86%) +0.01s (+ 0.07%) 22.41s 22.98s
xstate - node (v16.17.1, x64)
Memory used 567,905k (± 0.01%) 567,961k (± 0.02%) +56k (+ 0.01%) 567,876k 568,104k
Parse Time 4.77s (± 0.62%) 4.66s (± 1.42%) -0.12s (- 2.43%) 4.60s 4.78s
Bind Time 1.65s (± 0.79%) 1.72s (± 1.62%) +0.07s (+ 4.22%) 1.67s 1.74s
Check Time 2.83s (± 0.32%) 2.83s (± 0.41%) +0.00s (+ 0.02%) 2.81s 2.84s
Emit Time 0.08s (± 6.32%) 0.09s (± 5.90%) +0.00s (+ 3.89%) 0.08s 0.09s
Total Time 9.35s (± 0.45%) 9.30s (± 0.50%) -0.05s (- 0.56%) 9.25s 9.37s
Angular - node (v14.15.1, x64)
Memory used 365,414k (± 0.01%) 365,407k (± 0.01%) -8k (- 0.00%) 365,374k 365,442k
Parse Time 4.16s (± 0.52%) 4.15s (± 0.40%) -0.01s (- 0.27%) 4.12s 4.17s
Bind Time 1.30s (± 0.34%) 1.30s (± 0.61%) +0.00s (+ 0.09%) 1.29s 1.31s
Check Time 9.66s (± 0.37%) 9.69s (± 0.68%) +0.02s (+ 0.24%) 9.61s 9.80s
Emit Time 8.22s (± 0.28%) 8.21s (± 0.77%) -0.01s (- 0.15%) 8.12s 8.27s
Total Time 23.34s (± 0.19%) 23.34s (± 0.51%) -0.00s (- 0.00%) 23.18s 23.54s
Compiler-Unions - node (v14.15.1, x64)
Memory used 195,777k (± 0.70%) 195,202k (± 0.01%) -575k (- 0.29%) 195,168k 195,232k
Parse Time 1.85s (± 0.64%) 1.85s (± 0.57%) -0.00s (- 0.23%) 1.83s 1.86s
Bind Time 0.88s (± 0.87%) 0.87s (± 0.58%) -0.01s (- 0.61%) 0.86s 0.88s
Check Time 10.12s (± 0.66%) 10.10s (± 0.69%) -0.02s (- 0.18%) 10.01s 10.18s
Emit Time 3.14s (± 1.35%) 3.11s (± 0.80%) -0.03s (- 0.92%) 3.09s 3.15s
Total Time 15.99s (± 0.59%) 15.93s (± 0.50%) -0.06s (- 0.35%) 15.83s 16.01s
Monaco - node (v14.15.1, x64)
Memory used 348,291k (± 0.01%) 348,305k (± 0.02%) +14k (+ 0.00%) 348,279k 348,412k
Parse Time 3.25s (± 0.89%) 3.27s (± 0.85%) +0.02s (+ 0.56%) 3.24s 3.31s
Bind Time 1.12s (± 0.36%) 1.12s (± 0.70%) +0.00s (+ 0.25%) 1.11s 1.13s
Check Time 8.17s (± 0.58%) 8.15s (± 0.28%) -0.02s (- 0.29%) 8.12s 8.18s
Emit Time 4.71s (± 1.59%) 4.72s (± 0.53%) +0.01s (+ 0.28%) 4.68s 4.75s
Total Time 17.25s (± 0.52%) 17.26s (± 0.18%) +0.01s (+ 0.06%) 17.22s 17.30s
TFS - node (v14.15.1, x64)
Memory used 304,463k (± 0.00%) 304,468k (± 0.00%) +5k (+ 0.00%) 304,451k 304,479k
Parse Time 2.74s (± 1.34%) 2.74s (± 0.83%) +0.01s (+ 0.20%) 2.71s 2.77s
Bind Time 1.09s (± 0.71%) 1.09s (± 0.52%) +0.00s (+ 0.05%) 1.09s 1.10s
Check Time 7.73s (± 0.47%) 7.72s (± 0.63%) -0.01s (- 0.14%) 7.68s 7.79s
Emit Time 4.61s (± 0.68%) 4.58s (± 0.91%) -0.03s (- 0.71%) 4.54s 4.65s
Total Time 16.18s (± 0.45%) 16.15s (± 0.46%) -0.03s (- 0.20%) 16.06s 16.22s
material-ui - node (v14.15.1, x64)
Memory used 479,971k (± 0.00%) 479,962k (± 0.01%) -10k (- 0.00%) 479,915k 480,000k
Parse Time 3.91s (± 0.79%) 3.88s (± 0.74%) -0.02s (- 0.58%) 3.85s 3.93s
Bind Time 1.05s (± 0.55%) 1.04s (± 0.43%) -0.01s (- 1.30%) 1.03s 1.05s
Check Time 18.99s (± 0.70%) 18.96s (± 0.46%) -0.03s (- 0.15%) 18.83s 19.07s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 23.95s (± 0.48%) 23.89s (± 0.27%) -0.06s (- 0.27%) 23.80s 23.96s
xstate - node (v14.15.1, x64)
Memory used 556,303k (± 0.00%) 556,326k (± 0.01%) +23k (+ 0.00%) 556,267k 556,354k
Parse Time 5.11s (± 0.38%) 5.16s (± 0.74%) +0.05s (+ 0.91%) 5.12s 5.23s
Bind Time 1.59s (± 0.64%) 1.58s (± 0.50%) -0.01s (- 0.67%) 1.57s 1.59s
Check Time 2.98s (± 0.60%) 3.00s (± 0.62%) +0.02s (+ 0.62%) 2.97s 3.03s
Emit Time 0.10s (± 0.16%) 0.10s (± 0.10%) +0.00s (+ 0.07%) 0.10s 0.10s
Total Time 9.78s (± 0.17%) 9.83s (± 0.40%) +0.05s (+ 0.52%) 9.79s 9.90s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 51753 6
Baseline main 6

TSServer

Comparison Report - main..51753
Metric main 51753 Delta Best Worst
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,539ms (± 1.45%) 2,541ms (± 1.74%) +2ms (+ 0.09%) 2,463ms 2,582ms
Req 2 - geterr 5,358ms (± 0.78%) 5,374ms (± 0.98%) +16ms (+ 0.30%) 5,322ms 5,470ms
Req 3 - references 373ms (± 1.14%) 374ms (± 1.26%) +1ms (+ 0.23%) 368ms 382ms
Req 4 - navto 280ms (± 0.70%) 280ms (± 1.91%) +0ms (+ 0.06%) 276ms 288ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 310ms (± 2.31%) 303ms (± 1.73%) -6ms (- 2.06%) 298ms 311ms
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,766ms (± 1.22%) 2,766ms (± 1.48%) +0ms (+ 0.01%) 2,713ms 2,817ms
Req 2 - geterr 3,957ms (± 0.54%) 3,958ms (± 0.98%) +1ms (+ 0.03%) 3,903ms 4,006ms
Req 3 - references 360ms (± 1.19%) 367ms (± 1.35%) +7ms (+ 1.93%) 362ms 373ms
Req 4 - navto 296ms (± 0.76%) 296ms (± 1.07%) -0ms (- 0.17%) 290ms 300ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 66ms (± 1.43%) 71ms (± 4.74%) +5ms (+ 6.84%) 67ms 75ms
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,392ms (± 0.39%) 3,406ms (± 0.81%) +14ms (+ 0.41%) 3,368ms 3,447ms
Req 2 - geterr 1,534ms (± 1.06%) 1,533ms (± 0.60%) -2ms (- 0.11%) 1,520ms 1,543ms
Req 3 - references 105ms (± 3.17%) 106ms (± 1.17%) +1ms (+ 1.10%) 104ms 108ms
Req 4 - navto 359ms (± 0.98%) 363ms (± 0.95%) +4ms (+ 1.05%) 358ms 367ms
Req 5 - completionInfo count 3,154 (± 0.00%) 3,154 (± 0.00%) 0 ( 0.00%) 3,154 3,154
Req 5 - completionInfo 428ms (± 1.78%) 432ms (± 0.43%) +3ms (+ 0.81%) 428ms 434ms
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,776ms (± 0.68%) 2,786ms (± 0.26%) +10ms (+ 0.35%) 2,776ms 2,795ms
Req 2 - geterr 5,896ms (± 2.02%) 5,852ms (± 2.26%) -43ms (- 0.74%) 5,703ms 5,996ms
Req 3 - references 362ms (± 0.62%) 366ms (± 1.39%) +5ms (+ 1.24%) 362ms 376ms
Req 4 - navto 281ms (± 1.94%) 318ms (±27.06%) +38ms (+13.47%) 276ms 494ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 164ms (±72.41%) 206ms (±62.88%) +42ms (+25.27%) 80ms 327ms
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,923ms (± 0.65%) 2,918ms (± 0.22%) -5ms (- 0.16%) 2,911ms 2,930ms
Req 2 - geterr 4,284ms (± 0.77%) 4,288ms (± 0.76%) +4ms (+ 0.10%) 4,243ms 4,339ms
Req 3 - references 376ms (± 0.65%) 375ms (± 0.62%) -1ms (- 0.34%) 373ms 378ms
Req 4 - navto 304ms (± 0.47%) 303ms (± 0.47%) -1ms (- 0.24%) 301ms 305ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 313ms (± 0.82%) 313ms (± 0.56%) -1ms (- 0.23%) 310ms 314ms
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,768ms (± 0.54%) 3,760ms (± 0.39%) -8ms (- 0.20%) 3,735ms 3,775ms
Req 2 - geterr 1,465ms (± 1.20%) 1,465ms (± 0.90%) +1ms (+ 0.04%) 1,449ms 1,482ms
Req 3 - references 111ms (± 0.86%) 107ms (± 4.82%) -3ms (- 2.89%) 102ms 115ms
Req 4 - navto 346ms (± 1.57%) 344ms (± 1.16%) -2ms (- 0.65%) 336ms 347ms
Req 5 - completionInfo count 3,154 (± 0.00%) 3,154 (± 0.00%) 0 ( 0.00%) 3,154 3,154
Req 5 - completionInfo 478ms (± 1.99%) 462ms (± 1.55%) 🟩-15ms (- 3.20%) 457ms 472ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,729ms (± 8.26%) 2,806ms (± 6.90%) +76ms (+ 2.80%) 2,411ms 2,900ms
Req 2 - geterr 5,823ms (± 8.36%) 5,973ms (± 6.84%) +151ms (+ 2.59%) 5,141ms 6,165ms
Req 3 - references 358ms (± 8.32%) 370ms (± 6.44%) +12ms (+ 3.34%) 321ms 384ms
Req 4 - navto 276ms (± 7.84%) 285ms (± 6.41%) +9ms (+ 3.32%) 248ms 294ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 159ms (±69.64%) 127ms (±73.99%) 🟩-31ms (-19.67%) 83ms 320ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,764ms (±21.67%) 3,016ms (± 0.42%) +251ms (+ 9.09%) 3,001ms 3,037ms
Req 2 - geterr 4,188ms (±21.64%) 4,564ms (± 0.30%) +376ms (+ 8.98%) 4,547ms 4,583ms
Req 3 - references 371ms (±21.86%) 402ms (± 1.09%) +31ms (+ 8.46%) 394ms 406ms
Req 4 - navto 282ms (±22.15%) 309ms (± 1.00%) +27ms (+ 9.47%) 305ms 313ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 73ms (±17.85%) 82ms (± 8.52%) +9ms (+12.37%) 77ms 92ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,866ms (± 0.43%) 3,884ms (± 0.48%) +18ms (+ 0.48%) 3,855ms 3,904ms
Req 2 - geterr 1,459ms (± 0.55%) 1,466ms (± 1.03%) +7ms (+ 0.46%) 1,451ms 1,483ms
Req 3 - references 127ms (± 2.06%) 128ms (± 2.81%) +1ms (+ 1.12%) 123ms 133ms
Req 4 - navto 396ms (± 0.87%) 394ms (± 1.16%) -2ms (- 0.41%) 390ms 400ms
Req 5 - completionInfo count 3,154 (± 0.00%) 3,154 (± 0.00%) 0 ( 0.00%) 3,154 3,154
Req 5 - completionInfo 498ms (± 1.39%) 496ms (± 1.16%) -2ms (- 0.33%) 488ms 506ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
Benchmark Name Iterations
Current 51753 6
Baseline main 6

Startup

Comparison Report - main..51753
Metric main 51753 Delta Best Worst
tsc-startup - node (v16.17.1, x64)
Execution time 139.17ms (± 0.18%) 139.62ms (± 0.24%) +0.45ms (+ 0.33%) 138.23ms 142.63ms
tsserver-startup - node (v16.17.1, x64)
Execution time 230.84ms (± 0.16%) 231.48ms (± 0.23%) +0.64ms (+ 0.28%) 229.71ms 238.25ms
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 233.23ms (± 0.22%) 233.46ms (± 0.20%) +0.22ms (+ 0.10%) 232.17ms 240.01ms
typescript-startup - node (v16.17.1, x64)
Execution time 214.84ms (± 0.17%) 215.17ms (± 0.25%) +0.33ms (+ 0.15%) 213.34ms 223.17ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current 51753 6
Baseline main 6

Developer Information:

Download Benchmark

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

I'm not sure it's necessary to fix the ParenthesizedExpression bug -- it's still an existing bug with @type afaik -- but we should have tests for it.

src/compiler/utilities.ts Show resolved Hide resolved
src/compiler/checker.ts Outdated Show resolved Hide resolved
tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag1.ts Outdated Show resolved Hide resolved
@a-tarasyuk a-tarasyuk force-pushed the feat/51086 branch 2 times, most recently from 660fa79 to e19d791 Compare January 13, 2023 17:14
@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 13, 2023

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 98f7db6. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 13, 2023

Hey @DanielRosenwasser, 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/142614/artifacts?artifactName=tgz&fileId=756144B95058A4FAC8E38B6C37F3A8CBF6D0B1004881585CC04226C896A1A04602&fileName=/typescript-5.0.0-insiders.20230113.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/[email protected]".;

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jan 14, 2023

So we tried @satisfies a little bit today and here's what we noticed.

  • @satisfies is not currently offered in completions for JSDoc tag names for declaration positions.

    /** @$ */
    let x = 10;
  • There are no type name completions in the braces of /** @satisfies {$} */

Those are the two things I would want to get fixed with this PR.


Something minor that we noticed was that there are mismatches between what TypeScript does in annotation/assertion/satisfies positions, along with what the corresponding JSDoc equivalents are.

// TS file
let a: string = 123;
//  ~

let b = 123 as string;
//      ~~~~~~~~~~~~~

let c = 123 satisfies string;
//                    ~~~~~~
// JS file
/** @satisfies {string} */
let a = 123;
//  ~

let b = /** @type {string} */ (123);
//                 ~~~~~~

/** @satisfies {string} */
//              ~~~~~~
let c = 123;

let d = /** @satisfies {string} */ (123);
//                      ~~~~~~

These are not consistent, but to be honest, I don't want you to change what you have in this PR because it would end up dragging it on and it's a separate concern from the feature itself. I'd rather file a separate follow-up issue instead.

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

Successfully merging this pull request may close these issues.

satisfies support in JSDoc
5 participants