CARVIEW |
Select Language
HTTP/2 200
date: Fri, 18 Jul 2025 21:12:05 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/microsoft/TypeScript.git
etag: W/"26d5024a71b9e1d83d06024499769286"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=OlDO4jiXRozVQY%2Fm3gGuV%2BJuJcmlG0BjMEwtUArw5t48d2z5qKP8CCFLV0E10mHwhVtIJ8X1XKeDGLbuMbkb3eUdcGC4q46ueJQVn6ODdweQkXQhkLNEEUIliK6nVagmfTL2qBNhhuZX2dHXaMtu0h%2F304BeV7yC1cN15fs32cnPSdhZpX3X4S90R8fk4W2l9BQ4l4kojH9R06OXcufagzgkK1GUdDpxVtCi%2B%2Bku8KZCkPEhZTp0sgG%2BlKaHLJwa4WD2oaF21O2u98RgSrgo6g%3D%3D--%2B41%2BoGMp%2BYnMfe%2By--SrUe2%2BOzDy%2F%2BwqpCDZZ%2FEg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.377928008.1752873123; Path=/; Domain=github.com; Expires=Sat, 18 Jul 2026 21:12:03 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 18 Jul 2026 21:12:03 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: ACDC:2DAD44:18A42C:20238B:687AB8A3
inferFromUsage codefix now emits JSDoc in JS files (#27610) · microsoft/TypeScript@88d3c6f · GitHub
Copy file name to clipboardExpand all lines: src/compiler/transformers/declarations/diagnostics.ts
Copy file name to clipboardExpand all lines: src/services/codefixes/inferFromUsage.ts
Copy file name to clipboardExpand all lines: src/services/textChanges.ts
Copy file name to clipboard
Copy file name to clipboard
Copy file name to clipboard
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit 88d3c6f
authored
inferFromUsage codefix now emits JSDoc in JS files (#27610)
* Now adding @type to variable declarations, at least
Probably everything else, but not as well.
* Improve @param output and add test
It's still bad, but at least it's not wrong.
* Add some js/inferFromUsage tests and fixes
Also, remove redundant is(Set|Get)Accessor functions.
* Fix @typedef refactor
* Emit JSDoc optional parameters
By surrounding the parameter name with brackets. It is super, super ugly
right now.
* Get rest of existing tests working
* Correct location of comments
* Handle @param blocks
1. Format multiple params nicely in a single-multiline block.
2. Generate only params that haven't already been documented. Existing
documentation is not touched.
* Re-add isGet/SetAccessor -- it is part of the API
* Move isSet/GetAccessor back to the original location
* Oh no I missed a newline and a space
* Switch to an object type
* A lot of cleanup
More to come, though. annotate is only called in
annotateVariableDeclaration where we don't know whether we're in JS or
not.
* Move and delegate to annotateJSDocParameters
* Address PR comments
* Lint: newline problems!!!!
* Switch another call to getNonformattedText
* Update baseline missed after merge1 parent 1a5e669 commit 88d3c6fCopy full SHA for 88d3c6f
File tree
Expand file treeCollapse file tree
24 files changed
+584
-40
lines changedFilter options
- src
- compiler/transformers/declarations
- harness
- services
- codefixes
- tests/cases/fourslash
Expand file treeCollapse file tree
24 files changed
+584
-40
lines changedsrc/compiler/transformers/declarations/diagnostics.ts
Copy file name to clipboardExpand all lines: src/compiler/transformers/declarations/diagnostics.ts+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
466 | 466 |
| |
467 | 467 |
| |
468 | 468 |
| |
469 |
| - | |
| 469 | + |
+6-2Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2516 | 2516 |
| |
2517 | 2517 |
| |
2518 | 2518 |
| |
2519 |
| - | |
| 2519 | + | |
2520 | 2520 |
| |
2521 | 2521 |
| |
2522 |
| - | |
| 2522 | + | |
2523 | 2523 |
| |
2524 | 2524 |
| |
2525 | 2525 |
| |
| |||
4388 | 4388 |
| |
4389 | 4389 |
| |
4390 | 4390 |
| |
| 4391 | + | |
| 4392 | + | |
| 4393 | + | |
| 4394 | + | |
4391 | 4395 |
| |
4392 | 4396 |
| |
4393 | 4397 |
| |
|
src/services/codefixes/inferFromUsage.ts
Copy file name to clipboardExpand all lines: src/services/codefixes/inferFromUsage.ts+69-25Lines changed: 69 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 | 29 |
| |
33 | 30 |
| |
34 | 31 |
| |
| |||
50 | 47 |
| |
51 | 48 |
| |
52 | 49 |
| |
53 |
| - | |
| 50 | + | |
54 | 51 |
| |
55 | 52 |
| |
56 | 53 |
| |
| |||
59 | 56 |
| |
60 | 57 |
| |
61 | 58 |
| |
62 |
| - | |
| 59 | + | |
63 | 60 |
| |
64 | 61 |
| |
65 | 62 |
| |
| |||
72 | 69 |
| |
73 | 70 |
| |
74 | 71 |
| |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 |
| |
76 | 81 |
| |
77 | 82 |
| |
| |||
92 | 97 |
| |
93 | 98 |
| |
94 | 99 |
| |
95 |
| - | |
| 100 | + | |
96 | 101 |
| |
97 | 102 |
| |
98 | 103 |
| |
| |||
108 | 113 |
| |
109 | 114 |
| |
110 | 115 |
| |
111 |
| - | |
| 116 | + | |
112 | 117 |
| |
113 | 118 |
| |
114 | 119 |
| |
115 | 120 |
| |
116 | 121 |
| |
117 | 122 |
| |
118 | 123 |
| |
119 |
| - | |
| 124 | + | |
120 | 125 |
| |
121 | 126 |
| |
122 | 127 |
| |
| |||
150 | 155 |
| |
151 | 156 |
| |
152 | 157 |
| |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
159 | 164 |
| |
160 |
| - | |
161 |
| - | |
162 |
| - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
163 | 173 |
| |
164 |
| - | |
| 174 | + | |
165 | 175 |
| |
166 | 176 |
| |
167 | 177 |
| |
168 | 178 |
| |
169 | 179 |
| |
170 | 180 |
| |
171 | 181 |
| |
172 |
| - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
173 | 188 |
| |
174 | 189 |
| |
175 | 190 |
| |
176 | 191 |
| |
177 | 192 |
| |
178 |
| - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
179 | 201 |
| |
180 | 202 |
| |
181 |
| - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
182 | 213 |
| |
183 | 214 |
| |
184 | 215 |
| |
| |||
212 | 243 |
| |
213 | 244 |
| |
214 | 245 |
| |
215 |
| - | |
| 246 | + | |
216 | 247 |
| |
217 | 248 |
| |
218 | 249 |
| |
| |||
228 | 259 |
| |
229 | 260 |
| |
230 | 261 |
| |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
231 | 269 |
| |
232 | 270 |
| |
233 | 271 |
| |
| |||
255 | 293 |
| |
256 | 294 |
| |
257 | 295 |
| |
258 |
| - | |
| 296 | + | |
259 | 297 |
| |
260 | 298 |
| |
261 | 299 |
| |
| |||
274 | 312 |
| |
275 | 313 |
| |
276 | 314 |
| |
| 315 | + | |
277 | 316 |
| |
278 | 317 |
| |
| 318 | + | |
279 | 319 |
| |
280 | 320 |
| |
281 | 321 |
| |
| |||
289 | 329 |
| |
290 | 330 |
| |
291 | 331 |
| |
292 |
| - | |
| 332 | + | |
293 | 333 |
| |
294 | 334 |
| |
295 |
| - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
296 | 340 |
| |
297 | 341 |
| |
298 | 342 |
| |
|
src/services/textChanges.ts
Copy file name to clipboardExpand all lines: src/services/textChanges.ts+51-1Lines changed: 51 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
212 | 218 |
| |
213 | 219 |
| |
214 | 220 |
| |
| |||
339 | 345 |
| |
340 | 346 |
| |
341 | 347 |
| |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
342 | 354 |
| |
343 | 355 |
| |
344 | 356 |
| |
| |||
347 | 359 |
| |
348 | 360 |
| |
349 | 361 |
| |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
350 | 379 |
| |
351 | 380 |
| |
352 | 381 |
| |
| |||
365 | 394 |
| |
366 | 395 |
| |
367 | 396 |
| |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
368 | 418 |
| |
369 | 419 |
| |
370 | 420 |
| |
| |||
806 | 856 |
| |
807 | 857 |
| |
808 | 858 |
| |
809 |
| - | |
| 859 | + | |
810 | 860 |
| |
811 | 861 |
| |
812 | 862 |
| |
|
tests/cases/fourslash/codeFixInferFromUsageCallJS.ts
Copy file name to clipboard+20Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + |
tests/cases/fourslash/codeFixInferFromUsageJS.ts
Copy file name to clipboard+12Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + |
tests/cases/fourslash/codeFixInferFromUsageMember2JS.ts
Copy file name to clipboard+14Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + |
You can’t perform that action at this time.
0 commit comments