CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 13:32:06 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/"86c87eb24bc3cb3519b22af21c955019"
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=8a1bCJa%2BcT8uIE0YqD7MivXAarICmWNDd7bjneQ9o1rTWGyHRrhupsjBFREomt5imGRjvyMNBx6MLq9EZAli4vhwHdNer42SbcrxtExBxBz57edb1cywJsomWdzaBTH5FPgiR5PS3V0GE5jak5tQzR1S1EFJZqo%2B60i2eadi%2BcgMRZIUc6LI2KdRncTuEjhQWnjPsTpnTmv7CtQ%2FSwbx3evnV50GpGgUrmC8UOnAIW7npcnLo3opWPNSPlpnxpIgBMS0zITYbfJ59Afe20W8Rw%3D%3D--1D03wJ7mVVtpLu7w--%2Fa6FFViCsNqs8LGWh4%2F2Ow%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1542711435.1752931924; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 13:32:04 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 13:32:04 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: ADAE:2E2A0B:472BC1:57CEDB:687B9E54
Add moduleDetection compiler flag to allow for changing how modules a… · microsoft/TypeScript@d1fa945 · GitHub
Dismiss banner
Copy file name to clipboardExpand all lines: src/compiler/commandLineParser.ts
Copy file name to clipboardExpand all lines: src/compiler/diagnosticMessages.json
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit d1fa945
authored
Add moduleDetection compiler flag to allow for changing how modules are parsed (#47495)
* Add moduleDetection compiler flag to allow for changing how modules are parsed
The default setting is 'auto', where JSX containing files under react-jsx and react-jsxdev are
always parsed as modules, and esm-format files under module: node12+ are always parsed as modules,
in addition to the 'legacy' detection mode's conditions for other files. (Declaration files are exempt from
these new conditions)
The 'legacy' mode preserves TS's behavior prior to the introduction of this flag - a file is
parsed as a module if it contains an import, export, or import.meta expression.
In addition, there is a 'force' mode that forces all non-declaration files to be parsed as modules.
(Declaration files are still only modules if they contain a top-level import or export.)
This technically breaks the parser API, but it's kinda-sorta backwards compatible so long
as you don't need the functionality associated with more recent compiler flags.
* Fix post-merge lint
* Rename function
* Update default value documentation
* PR feedback
* Fix lint and typo1 parent 0271738 commit d1fa945Copy full SHA for d1fa945
File tree
Expand file treeCollapse file tree
144 files changed
+2534
-203
lines changedFilter options
- src
- compiler
- harness
- server
- services
- refactors
- testRunner
- unittests/services
- extract
- tests
- baselines/reference
- api
- showConfig/Shows tsconfig for single option/moduleDetection
- tsConfig
- Default initialized TSConfig
- Initialized TSConfig with advanced options
- Initialized TSConfig with boolean value compiler options
- Initialized TSConfig with enum value compiler options
- Initialized TSConfig with files options
- Initialized TSConfig with incorrect compiler option value
- Initialized TSConfig with incorrect compiler option
- Initialized TSConfig with list compiler options with enum value
- Initialized TSConfig with list compiler options
- tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit
- cases/compiler
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
144 files changed
+2534
-203
lines changedsrc/compiler/commandLineParser.ts
Copy file name to clipboardExpand all lines: src/compiler/commandLineParser.ts+12Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1241 | 1241 |
| |
1242 | 1242 |
| |
1243 | 1243 |
| |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1244 | 1256 |
| |
1245 | 1257 |
| |
1246 | 1258 |
| |
|
+6-4Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2156 | 2156 |
| |
2157 | 2157 |
| |
2158 | 2158 |
| |
2159 |
| - | |
| 2159 | + | |
2160 | 2160 |
| |
| 2161 | + | |
2161 | 2162 |
| |
2162 |
| - | |
2163 |
| - | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
2164 | 2166 |
| |
2165 | 2167 |
| |
2166 |
| - | |
| 2168 | + | |
2167 | 2169 |
| |
2168 | 2170 |
| |
2169 | 2171 |
| |
|
src/compiler/diagnosticMessages.json
Copy file name to clipboardExpand all lines: src/compiler/diagnosticMessages.json+8Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1449 | 1449 |
| |
1450 | 1450 |
| |
1451 | 1451 |
| |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
1452 | 1460 |
| |
1453 | 1461 |
| |
1454 | 1462 |
| |
|
+100-57Lines changed: 100 additions & 57 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
63 | 98 |
| |
64 | 99 |
| |
65 | 100 |
| |
| |||
642 | 677 |
| |
643 | 678 |
| |
644 | 679 |
| |
645 |
| - | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
646 | 701 |
| |
647 | 702 |
| |
648 | 703 |
| |
649 | 704 |
| |
650 | 705 |
| |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
651 | 711 |
| |
652 |
| - | |
| 712 | + | |
653 | 713 |
| |
654 | 714 |
| |
655 |
| - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
656 | 720 |
| |
657 | 721 |
| |
658 | 722 |
| |
| |||
851 | 915 |
| |
852 | 916 |
| |
853 | 917 |
| |
854 |
| - | |
| 918 | + | |
855 | 919 |
| |
856 | 920 |
| |
857 | 921 |
| |
| |||
867 | 931 |
| |
868 | 932 |
| |
869 | 933 |
| |
870 |
| - | |
| 934 | + | |
871 | 935 |
| |
872 | 936 |
| |
873 | 937 |
| |
| |||
955 | 1019 |
| |
956 | 1020 |
| |
957 | 1021 |
| |
958 |
| - | |
| 1022 | + | |
959 | 1023 |
| |
960 | 1024 |
| |
961 | 1025 |
| |
| |||
1039 | 1103 |
| |
1040 | 1104 |
| |
1041 | 1105 |
| |
1042 |
| - | |
| 1106 | + | |
1043 | 1107 |
| |
1044 | 1108 |
| |
1045 | 1109 |
| |
| |||
1054 | 1118 |
| |
1055 | 1119 |
| |
1056 | 1120 |
| |
1057 |
| - | |
| 1121 | + | |
1058 | 1122 |
| |
1059 | 1123 |
| |
1060 | 1124 |
| |
| |||
1213 | 1277 |
| |
1214 | 1278 |
| |
1215 | 1279 |
| |
1216 |
| - | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
1217 | 1289 |
| |
1218 | 1290 |
| |
1219 | 1291 |
| |
1220 | 1292 |
| |
1221 |
| - | |
| 1293 | + | |
1222 | 1294 |
| |
1223 | 1295 |
| |
1224 | 1296 |
| |
1225 | 1297 |
| |
| 1298 | + | |
1226 | 1299 |
| |
1227 | 1300 |
| |
1228 |
| - | |
1229 |
| - | |
1230 |
| - | |
1231 |
| - | |
1232 |
| - | |
1233 |
| - | |
1234 |
| - | |
1235 |
| - | |
1236 |
| - | |
1237 | 1301 |
| |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1238 | 1316 |
| |
1239 | 1317 |
| |
1240 | 1318 |
| |
| |||
7575 | 7653 |
| |
7576 | 7654 |
| |
7577 | 7655 |
| |
7578 |
| - | |
7579 |
| - | |
7580 |
| - | |
7581 |
| - | |
7582 |
| - | |
7583 |
| - | |
7584 |
| - | |
7585 |
| - | |
7586 |
| - | |
7587 |
| - | |
7588 |
| - | |
7589 |
| - | |
7590 |
| - | |
7591 |
| - | |
7592 |
| - | |
7593 |
| - | |
7594 |
| - | |
7595 |
| - | |
7596 |
| - | |
7597 |
| - | |
7598 |
| - | |
7599 |
| - | |
7600 |
| - | |
7601 |
| - | |
7602 |
| - | |
7603 |
| - | |
7604 |
| - | |
7605 |
| - | |
7606 |
| - | |
7607 |
| - | |
7608 |
| - | |
7609 |
| - | |
7610 |
| - | |
7611 |
| - | |
7612 |
| - | |
7613 | 7656 |
| |
7614 | 7657 |
| |
7615 | 7658 |
| |
| |||
7652 | 7695 |
| |
7653 | 7696 |
| |
7654 | 7697 |
| |
7655 |
| - | |
| 7698 | + | |
7656 | 7699 |
| |
7657 | 7700 |
| |
7658 | 7701 |
| |
| |||
8698 | 8741 |
| |
8699 | 8742 |
| |
8700 | 8743 |
| |
8701 |
| - | |
| 8744 | + | |
8702 | 8745 |
| |
8703 | 8746 |
| |
8704 | 8747 |
| |
| |||
8762 | 8805 |
| |
8763 | 8806 |
| |
8764 | 8807 |
| |
8765 |
| - | |
| 8808 | + | |
8766 | 8809 |
| |
8767 | 8810 |
| |
8768 | 8811 |
| |
|
You can’t perform that action at this time.
0 commit comments