Skip to content

Fix global when typescript.js loaded as script - #58895

Merged
Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
jakebailey:fix-58893
Jun 17, 2024
Merged

Fix global when typescript.js loaded as script#58895
Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
jakebailey:fix-58893

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Fixes#58893

Not sure why I thought this worked, but I probably just assumed that the tests passed therefore it was okay. The tests didn't actually test anything. Oops.

getters/setters have been supported ~forever, so this method is fine. We have tests which verify everything now.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) cherry-pick this to release-5.5

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
cherry-pick this to release-5.5✅ Started✅ Results

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this

Checking startup perf, should not actually change much.

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey, Jake Bailey (@jakebailey)! I've created #58896 for you.

@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)
Errors3030~~~p=1.000 n=6
Symbols62,15362,153~~~p=1.000 n=6
Types50,24250,242~~~p=1.000 n=6
Memory used192,737k (± 0.77%)194,070k (± 0.91%)~192,204k195,731kp=0.065 n=6
Parse Time1.56s (± 0.87%)1.58s (± 0.33%)~1.57s1.58sp=0.051 n=6
Bind Time0.87s (± 1.03%)0.87s (± 0.94%)~0.86s0.88sp=0.550 n=6
Check Time11.23s (± 0.25%)11.22s (± 0.68%)~11.11s11.30sp=0.748 n=6
Emit Time3.27s (± 0.46%)3.29s (± 1.07%)~3.25s3.34sp=0.252 n=6
Total Time16.93s (± 0.15%)16.96s (± 0.52%)~16.82s17.06sp=0.378 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols944,104944,104~~~p=1.000 n=6
Types407,044407,044~~~p=1.000 n=6
Memory used1,218,280k (± 0.00%)1,218,249k (± 0.00%)~1,218,165k1,218,300kp=0.378 n=6
Parse Time8.00s (± 1.09%)7.92s (± 0.48%)-0.08s (- 1.04%)7.87s7.95sp=0.019 n=6
Bind Time2.25s (± 2.85%)2.23s (± 0.49%)~2.22s2.24sp=0.678 n=6
Check Time35.73s (± 0.34%)35.75s (± 0.52%)~35.51s35.99sp=1.000 n=6
Emit Time16.18s (± 0.39%)16.09s (± 0.66%)~15.90s16.20sp=0.170 n=6
Total Time62.16s (± 0.39%)61.99s (± 0.36%)~61.78s62.33sp=0.230 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,132,3262,132,326~~~p=1.000 n=6
Types926,744926,744~~~p=1.000 n=6
Memory used2,115,270k (± 0.01%)2,115,271k (± 0.01%)~2,115,115k2,115,455kp=1.000 n=6
Parse Time7.88s (± 0.48%)7.90s (± 0.26%)~7.86s7.92sp=0.422 n=6
Bind Time2.76s (± 0.36%)2.76s (± 0.27%)~2.75s2.77sp=0.554 n=6
Check Time83.98s (± 0.51%)84.00s (± 0.37%)~83.53s84.38sp=0.936 n=6
Emit Time0.16s (± 5.21%)0.16s (± 3.29%)~0.15s0.16sp=0.929 n=6
Total Time94.78s (± 0.45%)94.81s (± 0.32%)~94.35s95.17sp=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,230,9811,230,981~~~p=1.000 n=6
Types261,257261,257~~~p=1.000 n=6
Memory used2,346,645k (± 0.03%)2,356,791k (± 1.01%)~2,346,232k2,405,548kp=0.173 n=6
Parse Time7.44s (± 0.45%)7.41s (± 0.91%)~7.32s7.51sp=0.298 n=6
Bind Time2.80s (± 0.61%)2.79s (± 0.87%)~2.76s2.82sp=0.872 n=6
Check Time49.26s (± 0.24%)49.37s (± 0.23%)~49.19s49.48sp=0.093 n=6
Emit Time4.04s (± 5.96%)3.89s (± 2.47%)~3.78s4.04sp=0.521 n=6
Total Time63.53s (± 0.33%)63.48s (± 0.35%)~63.26s63.76sp=0.575 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,230,9811,230,981~~~p=1.000 n=6
Types261,257261,257~~~p=1.000 n=6
Memory used2,421,383k (± 0.04%)2,422,468k (± 0.04%)~2,420,887k2,423,144kp=0.066 n=6
Parse Time5.19s (± 0.49%)5.18s (± 0.54%)~5.15s5.22sp=0.574 n=6
Bind Time1.69s (± 0.96%)1.69s (± 1.70%)~1.64s1.72sp=0.681 n=6
Check Time34.32s (± 0.22%)34.31s (± 0.30%)~34.11s34.40sp=0.688 n=6
Emit Time2.77s (± 2.80%)2.64s (± 0.70%)🟩-0.13s (- 4.74%)2.62s2.67sp=0.005 n=6
Total Time43.99s (± 0.34%)43.84s (± 0.28%)~43.63s43.99sp=0.093 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols258,670258,670~~~p=1.000 n=6
Types104,901104,901~~~p=1.000 n=6
Memory used428,259k (± 0.00%)428,288k (± 0.01%)~428,252k428,353kp=0.261 n=6
Parse Time4.09s (± 0.83%)4.11s (± 0.90%)~4.07s4.17sp=0.628 n=6
Bind Time1.59s (± 1.17%)1.60s (± 0.79%)~1.58s1.62sp=0.461 n=6
Check Time22.09s (± 0.45%)22.11s (± 0.24%)~22.05s22.17sp=1.000 n=6
Emit Time1.73s (± 1.08%)1.74s (± 0.73%)~1.72s1.75sp=0.217 n=6
Total Time29.50s (± 0.41%)29.55s (± 0.21%)~29.45s29.63sp=0.173 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,565224,565~~~p=1.000 n=6
Types93,73493,734~~~p=1.000 n=6
Memory used369,503k (± 0.02%)369,532k (± 0.03%)~369,373k369,642kp=0.575 n=6
Parse Time3.45s (± 0.88%)3.44s (± 1.27%)~3.39s3.51sp=0.574 n=6
Bind Time1.94s (± 0.68%)1.94s (± 1.25%)~1.91s1.97sp=0.681 n=6
Check Time19.13s (± 0.39%)19.15s (± 0.35%)~19.06s19.22sp=0.688 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.52s (± 0.26%)24.52s (± 0.24%)~24.46s24.60sp=0.872 n=6
vscode - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,861,2902,861,290~~~p=1.000 n=6
Types969,811969,811~~~p=1.000 n=6
Memory used3,025,465k (± 0.00%)3,025,426k (± 0.00%)~3,025,312k3,025,502kp=0.378 n=6
Parse Time13.58s (± 0.36%)13.59s (± 0.15%)~13.56s13.61sp=0.295 n=6
Bind Time4.15s (± 0.28%)4.16s (± 0.28%)~4.15s4.18sp=0.187 n=6
Check Time72.86s (± 0.16%)72.89s (± 0.52%)~72.25s73.20sp=0.378 n=6
Emit Time23.94s (± 0.46%)23.98s (± 0.47%)~23.86s24.10sp=0.746 n=6
Total Time114.53s (± 0.15%)114.63s (± 0.32%)~114.07s115.05sp=0.575 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols266,914266,914~~~p=1.000 n=6
Types108,685108,685~~~p=1.000 n=6
Memory used411,324k (± 0.03%)411,315k (± 0.02%)~411,258k411,462kp=0.873 n=6
Parse Time3.81s (± 0.59%)3.81s (± 0.50%)~3.79s3.83sp=0.806 n=6
Bind Time1.70s (± 1.26%)1.69s (± 0.45%)~1.68s1.70sp=0.437 n=6
Check Time16.84s (± 0.30%)16.82s (± 0.20%)~16.77s16.86sp=0.290 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.36s (± 0.14%)22.32s (± 0.19%)~22.28s22.39sp=0.227 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols523,429523,429~~~p=1.000 n=6
Types177,955177,955~~~p=1.000 n=6
Memory used461,411k (± 0.07%)461,623k (± 0.07%)~461,034k462,015kp=0.471 n=6
Parse Time3.17s (± 0.73%)3.17s (± 0.66%)~3.15s3.21sp=0.871 n=6
Bind Time1.19s (± 0.34%)1.19s (± 0.69%)~1.18s1.20sp=0.206 n=6
Check Time18.10s (± 0.78%)18.11s (± 0.25%)~18.03s18.16sp=0.936 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.46s (± 0.65%)22.47s (± 0.21%)~22.38s22.51sp=0.809 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

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen3,422ms (± 0.44%)3,421ms (± 0.39%)~3,400ms3,437msp=1.000 n=6
Req 2 - geterr7,474ms (± 0.39%)7,474ms (± 0.73%)~7,407ms7,535msp=0.936 n=6
Req 3 - references394ms (± 0.94%)399ms (± 0.54%)~397ms402msp=0.063 n=6
Req 4 - navto345ms (± 0.99%)340ms (± 0.72%)-5ms (- 1.40%)335ms341msp=0.038 n=6
Req 5 - completionInfo count1,3571,357~~~p=1.000 n=6
Req 5 - completionInfo125ms (± 3.75%)126ms (± 5.65%)~113ms131msp=0.808 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,947ms (± 3.89%)3,060ms (± 9.48%)~2,883ms3,624msp=0.810 n=6
Req 2 - geterr5,073ms (±11.29%)4,873ms (±10.83%)~4,515ms5,569msp=0.173 n=6
Req 3 - references405ms (± 6.21%)402ms (± 8.20%)~335ms418msp=1.000 n=6
Req 4 - navto338ms (± 0.22%)339ms (± 3.60%)~323ms361msp=1.000 n=6
Req 5 - completionInfo count1,5191,519~~~p=1.000 n=6
Req 5 - completionInfo111ms (± 6.75%)115ms (± 7.01%)~109ms126msp=0.624 n=6
xstate-main-1-tsserver - node (v18.15.0, x64)
Req 1 - updateOpen7,643ms (± 0.26%)7,626ms (± 0.45%)~7,589ms7,667msp=0.689 n=6
Req 2 - geterr1,682ms (± 0.55%)1,700ms (± 1.42%)~1,663ms1,734msp=0.093 n=6
Req 3 - references112ms (± 0.98%)117ms (± 5.01%)~111ms123msp=0.157 n=6
Req 4 - navto586ms (± 2.62%)581ms (± 0.98%)~572ms589msp=0.470 n=6
Req 5 - completionInfo count3,4133,413~~~p=1.000 n=6
Req 5 - completionInfo1,239ms (± 1.60%)1,236ms (± 3.18%)~1,187ms1,300msp=0.689 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstate-main-1-tsserver - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time229.24ms (± 0.17%)229.44ms (± 0.18%)+0.20ms (+ 0.09%)227.19ms233.20msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time295.81ms (± 0.29%)295.87ms (± 0.26%)~288.57ms300.09msp=0.303 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time288.06ms (± 0.28%)288.07ms (± 0.29%)~281.21ms296.56msp=0.914 n=600
typescript-startup - node (v18.15.0, x64)
Execution time288.01ms (± 0.29%)287.91ms (± 0.29%)~280.37ms294.29msp=0.062 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@jakebailey
Jake Bailey (jakebailey) merged commit ed81ca6 into microsoft:mainJun 17, 2024
@jakebailey
Jake Bailey (jakebailey) deleted the fix-58893 branch June 17, 2024 21:07
@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) cherry-pick this to release-5.5

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
cherry-pick this to release-5.5✅ Started✅ Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey, Jake Bailey (@jakebailey)! I've updated #58896 for you.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) pack this

dunno if this works on merged PRs...

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
pack this✅ Started

@jakebailey

Copy link
Copy Markdown
MemberAuthor

nope

Jake Bailey (jakebailey) added a commit that referenced this pull request Jun 18, 2024
…e-5.5 (#58896)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ts object has no properties when loading typescript.js in a browser with v5.5-rc

4 participants

@jakebailey@typescript-bot@andrewbranch@sandersn