CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 13:51:27 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/"74fe06844b2ae3267f62635306f7329e"
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=iFqDqhOfe19%2FqZod6l2DMhaOtXX8u7mya75cpcf5B5qeD8PuQE7JxTyC4KdftqUF3vKYl1Fx%2BIepxlNOgL98SFMh91mi3WIf2yiF%2Bw8Z6v%2FmIgficukqUh%2Bp5dC2XmHgj4GJmWUYhp6ThSfnM5KjeOu6xQ1HXh7kh7cUbV0YF0VWhLhFl2gtDy3Ar8qTzKe1DTF3Ugxl3ecng%2Fomy4WX50%2FSNXCtGhkDwHpjMfyrjo549j1T2g26TisWIvEx2dDTU2yjbhKFT88dGtrwHoQdtA%3D%3D--lDPYwP1QfvUI%2FFZw--jDNZaOuXbYkOx9Q7L1Mwsg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.762765282.1752933085; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 13:51:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 13:51:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A500:21B12E:54A7E3:6A2A54:687BA2DD
Add jsdoc support for @public/@private/@protected (#35731) · microsoft/TypeScript@3c5ecc2 · GitHub
Copy file name to clipboardExpand all lines: src/compiler/transformers/declarations.ts
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit 3c5ecc2
authored
Add jsdoc support for @public/@private/@Protected (#35731)
* Add @private/@protected/@public test
* Fix @declaration
* draft abstraction + one usage
* Fill in necessary parsing etc
* make general getEffectiveModifierFlags
move to utilities, make the right things call it
* reorder public/private/protected
* JS declaration emit works with @public/@private/@Protected
* revert unneeded/incorrect changes
* Update baselines and skip @public/etc when parsing
1. Update the API baselines with the new functions.
2. Do not check for @public/etc during parsing, because parent pointers
aren't set, so non-local tags will be missed; this wrong answer will
then be cached.
* Parser: don't call hasModifier(s) anymore.
Then move jsdoc modifier tag checks into getModifierFlagsNoCache where
they should be. The jsdoc checks are skipped when the parent is
undefined. There are 3 cases when this can happen:
1. The code is in the parser (or a few places in the binder, notably
declareSymbol of module.exports assignments).
2. The node is a source file.
3. The node is synthetic, which I assume to be from the transforms.
It is fine to call getModifierFlags in cases (2) and (3). It is not fine
for (1), so I removed these calls and replaced them with simple
iteration over the modifiers. Worth noting: Ron's uniform node construction
PR removes these calls anyway; this PR just does it early.
* Fix constructor emit
1. Emit protected for protected, which I missed earlier.
2. Emit a constructor, not a property named "constructor".
3. Split declaration emit tests out so that errors are properly reported
there.1 parent f7860b0 commit 3c5ecc2Copy full SHA for 3c5ecc2
File tree
Expand file treeCollapse file tree
16 files changed
+1023
-68
lines changedFilter options
- src/compiler
- transformers
- tests
- baselines/reference
- api
- cases/conformance/jsdoc
Expand file treeCollapse file tree
16 files changed
+1023
-68
lines changed+37-9Lines changed: 37 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5838 | 5838 |
| |
5839 | 5839 |
| |
5840 | 5840 |
| |
| 5841 | + | |
| 5842 | + | |
5841 | 5843 |
| |
5842 | 5844 |
| |
5843 | 5845 |
| |
| |||
5849 | 5851 |
| |
5850 | 5852 |
| |
5851 | 5853 |
| |
5852 |
| - | |
| 5854 | + | |
5853 | 5855 |
| |
5854 | 5856 |
| |
5855 | 5857 |
| |
5856 | 5858 |
| |
5857 | 5859 |
| |
5858 | 5860 |
| |
5859 | 5861 |
| |
5860 |
| - | |
| 5862 | + | |
5861 | 5863 |
| |
5862 | 5864 |
| |
5863 | 5865 |
| |
5864 | 5866 |
| |
5865 | 5867 |
| |
5866 | 5868 |
| |
5867 | 5869 |
| |
5868 |
| - | |
| 5870 | + | |
5869 | 5871 |
| |
5870 | 5872 |
| |
5871 | 5873 |
| |
5872 | 5874 |
| |
5873 | 5875 |
| |
| 5876 | + | |
5874 | 5877 |
| |
5875 | 5878 |
| |
5876 |
| - | |
| 5879 | + | |
5877 | 5880 |
| |
5878 | 5881 |
| |
5879 |
| - | |
| 5882 | + | |
5880 | 5883 |
| |
5881 | 5884 |
| |
5882 | 5885 |
| |
| |||
5887 | 5890 |
| |
5888 | 5891 |
| |
5889 | 5892 |
| |
5890 |
| - | |
| 5893 | + | |
5891 | 5894 |
| |
5892 | 5895 |
| |
5893 |
| - | |
| 5896 | + | |
5894 | 5897 |
| |
5895 | 5898 |
| |
5896 | 5899 |
| |
| |||
5899 | 5902 |
| |
5900 | 5903 |
| |
5901 | 5904 |
| |
| 5905 | + | |
| 5906 | + | |
| 5907 | + | |
| 5908 | + | |
| 5909 | + | |
| 5910 | + | |
| 5911 | + | |
| 5912 | + | |
| 5913 | + | |
| 5914 | + | |
| 5915 | + | |
5902 | 5916 |
| |
5903 | 5917 |
| |
5904 | 5918 |
| |
5905 | 5919 |
| |
5906 | 5920 |
| |
5907 |
| - | |
5908 |
| - | |
| 5921 | + | |
| 5922 | + | |
5909 | 5923 |
| |
5910 | 5924 |
| |
5911 | 5925 |
| |
| |||
6093 | 6107 |
| |
6094 | 6108 |
| |
6095 | 6109 |
| |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
| 6113 | + | |
| 6114 | + | |
| 6115 | + | |
| 6116 | + | |
| 6117 | + | |
| 6118 | + | |
| 6119 | + | |
| 6120 | + | |
| 6121 | + | |
| 6122 | + | |
| 6123 | + | |
6096 | 6124 |
| |
6097 | 6125 |
| |
6098 | 6126 |
| |
|
+28-11Lines changed: 28 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
| 509 | + | |
| 510 | + | |
| 511 | + | |
509 | 512 |
| |
510 | 513 |
| |
511 | 514 |
| |
| |||
2581 | 2584 |
| |
2582 | 2585 |
| |
2583 | 2586 |
| |
2584 |
| - | |
| 2587 | + | |
2585 | 2588 |
| |
2586 | 2589 |
| |
2587 | 2590 |
| |
| |||
3600 | 3603 |
| |
3601 | 3604 |
| |
3602 | 3605 |
| |
3603 |
| - | |
| 3606 | + | |
3604 | 3607 |
| |
3605 | 3608 |
| |
3606 | 3609 |
| |
| |||
3806 | 3809 |
| |
3807 | 3810 |
| |
3808 | 3811 |
| |
3809 |
| - | |
| 3812 | + | |
3810 | 3813 |
| |
3811 | 3814 |
| |
3812 | 3815 |
| |
| |||
5002 | 5005 |
| |
5003 | 5006 |
| |
5004 | 5007 |
| |
5005 |
| - | |
| 5008 | + | |
5006 | 5009 |
| |
5007 | 5010 |
| |
5008 | 5011 |
| |
| |||
5831 | 5834 |
| |
5832 | 5835 |
| |
5833 | 5836 |
| |
5834 |
| - | |
| 5837 | + | |
5835 | 5838 |
| |
5836 |
| - | |
| 5839 | + | |
5837 | 5840 |
| |
5838 | 5841 |
| |
5839 | 5842 |
| |
| |||
5866 | 5869 |
| |
5867 | 5870 |
| |
5868 | 5871 |
| |
5869 |
| - | |
| 5872 | + | |
5870 | 5873 |
| |
5871 | 5874 |
| |
5872 | 5875 |
| |
| |||
6508 | 6511 |
| |
6509 | 6512 |
| |
6510 | 6513 |
| |
6511 |
| - | |
| 6514 | + | |
6512 | 6515 |
| |
6513 | 6516 |
| |
6514 | 6517 |
| |
| |||
6525 | 6528 |
| |
6526 | 6529 |
| |
6527 | 6530 |
| |
| 6531 | + | |
| 6532 | + | |
| 6533 | + | |
| 6534 | + | |
| 6535 | + | |
6528 | 6536 |
| |
6529 | 6537 |
| |
6530 | 6538 |
| |
| |||
6826 | 6834 |
| |
6827 | 6835 |
| |
6828 | 6836 |
| |
6829 |
| - | |
| 6837 | + | |
| 6838 | + | |
| 6839 | + | |
| 6840 | + | |
| 6841 | + | |
| 6842 | + | |
| 6843 | + | |
| 6844 | + | |
| 6845 | + | |
| 6846 | + | |
6830 | 6847 |
| |
6831 | 6848 |
| |
6832 | 6849 |
| |
| |||
7192 | 7209 |
| |
7193 | 7210 |
| |
7194 | 7211 |
| |
7195 |
| - | |
7196 |
| - | |
| 7212 | + | |
| 7213 | + | |
7197 | 7214 |
| |
7198 | 7215 |
| |
7199 | 7216 |
| |
|
src/compiler/transformers/declarations.ts
Copy file name to clipboardExpand all lines: src/compiler/transformers/declarations.ts+6-9Lines changed: 6 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
840 | 840 |
| |
841 | 841 |
| |
842 | 842 |
| |
843 |
| - | |
844 | 843 |
| |
845 | 844 |
| |
846 | 845 |
| |
847 |
| - | |
848 |
| - | |
849 |
| - | |
| 846 | + | |
| 847 | + | |
850 | 848 |
| |
851 | 849 |
| |
852 | 850 |
| |
| |||
865 | 863 |
| |
866 | 864 |
| |
867 | 865 |
| |
868 |
| - | |
869 | 866 |
| |
870 | 867 |
| |
871 | 868 |
| |
872 | 869 |
| |
873 | 870 |
| |
874 | 871 |
| |
875 |
| - | |
876 |
| - | |
| 872 | + | |
| 873 | + | |
877 | 874 |
| |
878 | 875 |
| |
879 | 876 |
| |
| |||
892 | 889 |
| |
893 | 890 |
| |
894 | 891 |
| |
895 |
| - | |
| 892 | + | |
896 | 893 |
| |
897 | 894 |
| |
898 | 895 |
| |
| |||
901 | 898 |
| |
902 | 899 |
| |
903 | 900 |
| |
904 |
| - | |
| 901 | + | |
905 | 902 |
| |
906 | 903 |
| |
907 | 904 |
| |
|
+15Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
468 | 468 |
| |
469 | 469 |
| |
470 | 470 |
| |
| 471 | + | |
| 472 | + | |
| 473 | + | |
471 | 474 |
| |
472 | 475 |
| |
473 | 476 |
| |
| |||
2617 | 2620 |
| |
2618 | 2621 |
| |
2619 | 2622 |
| |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
2620 | 2635 |
| |
2621 | 2636 |
| |
2622 | 2637 |
| |
|
+9Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4125 | 4125 |
| |
4126 | 4126 |
| |
4127 | 4127 |
| |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
4128 | 4137 |
| |
4129 | 4138 |
| |
4130 | 4139 |
| |
|
You can’t perform that action at this time.
0 commit comments