CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 04:43:35 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/"3358c2a0b90cba25a346730ab0dc3339"
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=oob118GxUtXq52WePn8dUUDxAsNxIdOfn%2BzG3Va3SE%2Bn6S9RccY54I7QHc1bAsPAo%2FevROxnKDRw4ikXXoB11K2%2BVQ1fLY1I0rSAXnBm3G2d%2FOdG0fB0EYxhlotX7C5DaIvbFNfKjwCmnCB0pTv%2FVZnXIfvcezg%2ByudloPkhRse29fLeDRlQD%2F1JzZpagucDBREbiHvZ3QxyO5uqlDMLhx78PMZQiMzqB9qIXE2UR2AKruQ3ee7VvdO2KA%2BNGUJJ3bq2YOjv8LWFtIQjAq9i6g%3D%3D--yF6NfNViReRnnJub--wrz5T6rPw1yI3hCGYlzCIA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.689851377.1752900214; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 04:43:34 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 04:43:34 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: C9E8:3C366:698C:88F5:687B2276
Property assignments in Typescript (#26368) · microsoft/TypeScript@cc67ce1 · GitHub
Copy file name to clipboardExpand all lines: tests/baselines/reference/fixSignatureCaching.errors.txt
Copy file name to clipboardExpand all lines: tests/baselines/reference/fixSignatureCaching.js
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit cc67ce1
authored
Property assignments in Typescript (#26368)
* Allow special property assignments in TS
But only for functions and constant variable declarations initialised with
functions.
This specifically excludes class declarations and class expressions,
which differs from Javascript. That's because Typescript supports
`static` properties, which are equivalent to property assignments to a
class.
* Improve contextual typing predicate
Don't think it's right yet, but probably closer?
* More fixes.
The code is still fantastically ugly, but everything works the way it
should.
Also update baselines, even where it is ill-advised.
* Cleanup
* Remove extra whitespace
* Some kind of fix to isAnyDeclarationName
It's not done yet.
Specifically, in TS:
Special property assignments are supposed to be declaration sites (but not all
top-level assignments), and I think I
got them to be. (But not sure).
In JS:
Special property assignments are supposed to be declaration sites (but not all
top-level assignments), and I'm pretty sure ALL top-level assignments
have been declaration sites for some time. This is incorrect, and
probably means the predicate needs to be the same for both dialects.
* Add fourslash and improve isAnyDeclarationName
Now JS behaves the same as TS.
* Cleanup from PR comments1 parent 08eb99d commit cc67ce1Copy full SHA for cc67ce1
File tree
Expand file treeCollapse file tree
19 files changed
+886
-103
lines changedFilter options
- src/compiler
- tests
- baselines/reference
- cases
- conformance
- salsa
- fourslash
Expand file treeCollapse file tree
19 files changed
+886
-103
lines changed+5Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2480 | 2480 |
| |
2481 | 2481 |
| |
2482 | 2482 |
| |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
2483 | 2488 |
| |
2484 | 2489 |
| |
2485 | 2490 |
| |
|
+56-40Lines changed: 56 additions & 40 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4821 | 4821 |
| |
4822 | 4822 |
| |
4823 | 4823 |
| |
4824 |
| - | |
4825 |
| - | |
4826 |
| - | |
4827 |
| - | |
4828 |
| - | |
4829 |
| - | |
4830 |
| - | |
4831 |
| - | |
4832 |
| - | |
4833 |
| - | |
4834 |
| - | |
4835 |
| - | |
4836 |
| - | |
4837 |
| - | |
4838 |
| - | |
4839 |
| - | |
4840 |
| - | |
4841 |
| - | |
4842 |
| - | |
4843 |
| - | |
4844 |
| - | |
4845 |
| - | |
4846 |
| - | |
4847 |
| - | |
4848 |
| - | |
4849 |
| - | |
4850 |
| - | |
4851 |
| - | |
4852 |
| - | |
4853 |
| - | |
4854 |
| - | |
4855 |
| - | |
| 4824 | + | |
| 4825 | + | |
| 4826 | + | |
| 4827 | + | |
| 4828 | + | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
4856 | 4834 |
| |
4857 |
| - | |
4858 |
| - | |
4859 |
| - | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
4860 | 4841 |
| |
4861 |
| - | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
| 4857 | + | |
| 4858 | + | |
4862 | 4859 |
| |
4863 |
| - | |
| 4860 | + | |
4864 | 4861 |
| |
4865 |
| - | |
| 4862 | + | |
4866 | 4863 |
| |
4867 | 4864 |
| |
4868 | 4865 |
| |
| |||
5085 | 5082 |
| |
5086 | 5083 |
| |
5087 | 5084 |
| |
5088 |
| - | |
| 5085 | + | |
| 5086 | + | |
| 5087 | + | |
5089 | 5088 |
| |
5090 | 5089 |
| |
5091 | 5090 |
| |
| |||
16025 | 16024 |
| |
16026 | 16025 |
| |
16027 | 16026 |
| |
16028 |
| - | |
| 16027 | + | |
| 16028 | + | |
| 16029 | + | |
| 16030 | + | |
| 16031 | + | |
| 16032 | + | |
| 16033 | + | |
| 16034 | + | |
| 16035 | + | |
| 16036 | + | |
| 16037 | + | |
| 16038 | + | |
| 16039 | + | |
| 16040 | + | |
| 16041 | + | |
| 16042 | + | |
| 16043 | + | |
| 16044 | + | |
16029 | 16045 |
| |
16030 | 16046 |
| |
16031 | 16047 |
| |
|
+22-4Lines changed: 22 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1725 | 1725 |
| |
1726 | 1726 |
| |
1727 | 1727 |
| |
1728 |
| - | |
| 1728 | + | |
1729 | 1729 |
| |
1730 | 1730 |
| |
1731 | 1731 |
| |
1732 | 1732 |
| |
1733 | 1733 |
| |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
1734 | 1737 |
| |
1735 | 1738 |
| |
1736 | 1739 |
| |
| |||
1892 | 1895 |
| |
1893 | 1896 |
| |
1894 | 1897 |
| |
1895 |
| - | |
1896 |
| - | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1897 | 1904 |
| |
1898 | 1905 |
| |
1899 | 1906 |
| |
| |||
1954 | 1961 |
| |
1955 | 1962 |
| |
1956 | 1963 |
| |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
1957 | 1972 |
| |
1958 | 1973 |
| |
1959 | 1974 |
| |
| |||
2354 | 2369 |
| |
2355 | 2370 |
| |
2356 | 2371 |
| |
2357 |
| - | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
2358 | 2376 |
| |
2359 | 2377 |
| |
2360 | 2378 |
| |
|
tests/baselines/reference/fixSignatureCaching.errors.txt
Copy file name to clipboardExpand all lines: tests/baselines/reference/fixSignatureCaching.errors.txt+3-20Lines changed: 3 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
28 | 27 |
| |
29 | 28 |
| |
30 | 29 |
| |
| |||
49 | 48 |
| |
50 | 49 |
| |
51 | 50 |
| |
52 |
| - | |
53 | 51 |
| |
54 |
| - | |
55 | 52 |
| |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 | 53 |
| |
60 | 54 |
| |
61 | 55 |
| |
| |||
65 | 59 |
| |
66 | 60 |
| |
67 | 61 |
| |
68 |
| - | |
| 62 | + | |
69 | 63 |
| |
70 | 64 |
| |
71 | 65 |
| |
| |||
608 | 602 |
| |
609 | 603 |
| |
610 | 604 |
| |
611 |
| - | |
612 |
| - | |
613 | 605 |
| |
614 | 606 |
| |
615 | 607 |
| |
| |||
1112 | 1104 |
| |
1113 | 1105 |
| |
1114 | 1106 |
| |
1115 |
| - | |
1116 |
| - | |
1117 | 1107 |
| |
1118 | 1108 |
| |
1119 | 1109 |
| |
| |||
1135 | 1125 |
| |
1136 | 1126 |
| |
1137 | 1127 |
| |
1138 |
| - | |
1139 |
| - | |
1140 | 1128 |
| |
1141 | 1129 |
| |
1142 | 1130 |
| |
1143 | 1131 |
| |
1144 | 1132 |
| |
1145 | 1133 |
| |
1146 |
| - | |
1147 |
| - | |
1148 | 1134 |
| |
1149 | 1135 |
| |
1150 | 1136 |
| |
1151 | 1137 |
| |
1152 |
| - | |
1153 |
| - | |
1154 | 1138 |
| |
1155 | 1139 |
| |
1156 |
| - | |
1157 |
| - | |
1158 | 1140 |
| |
1159 | 1141 |
| |
1160 | 1142 |
| |
| |||
1183 | 1165 |
| |
1184 | 1166 |
| |
1185 | 1167 |
| |
1186 |
| - | |
| 1168 | + | |
| 1169 | + |
tests/baselines/reference/fixSignatureCaching.js
Copy file name to clipboardExpand all lines: tests/baselines/reference/fixSignatureCaching.js+2-1Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
986 | 986 |
| |
987 | 987 |
| |
988 | 988 |
| |
989 |
| - | |
| 989 | + | |
| 990 | + | |
990 | 991 |
| |
991 | 992 |
| |
992 | 993 |
| |
|
You can’t perform that action at this time.
0 commit comments