CARVIEW |
Select Language
HTTP/2 200
date: Fri, 18 Jul 2025 20:51:11 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/"5c553fce356f49d0467395e71fb4b240"
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=ljq128vTgkK%2FXxOPn7urluy4k65rqAZjxVWLPsNneih0UzFxHPr2GH%2BwGHx%2B0HwUWR%2BIWcuSDjeMp0VuMZeuh38FZfBVO0LKfV6UMvwuEQLFJkGk7mfwbgCRHr1ulrGG%2FRLTGMFoDyXdbyNSAeTKug41Gk8sqLmfWMt9XGg6Ah0nAc6MTftylYzwRxGOWmi8Wt33oPbN930qRKOzS8Y21ki770s9a1DMssiB3xR0eCquFCky0LTxQDHI4JuqK1mZqiN1ZQRt39swq6Kw0%2F4PVA%3D%3D--RF9F61Ton48kOhR1--aJN6QLzIv60iIwC8%2FjbMeg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1607661209.1752871869; Path=/; Domain=github.com; Expires=Sat, 18 Jul 2026 20:51:09 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 18 Jul 2026 20:51:09 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 85AA:29B498:16EF7D:1DC63E:687AB3BD
Added @ts-expect-error to @ts-ignore directives (#36014) · microsoft/TypeScript@ffde923 · GitHub
Copy file name to clipboardExpand all lines: src/compiler/diagnosticMessages.json
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 ffde923
* Added @ts-expect-error to @ts-ignore directives
Similar to `// @ts-ignore`, but will itself cause a new error diagnostic if it does not cause an existing diagnostic to be ignored.
Technical summary:
1. The scanner will now keep track of `CommentDirective`s it comes across: both `@ts-expect-error` and `@ts-ignore`
2. During type checking, the program will turn those directives into a map keying them by line number
3. For each diagnostic, if it's preceded by a directive, that directive is marked as "used"
4. All `@ts-expect-error` directives not marked as used generate a new diagnostic error
* Renamed to getDiagnosticsWithPrecedingDirectives per suggestion
* Added JSDoc comment I thought I did already
Co-authored-by: Orta <orta.therox+github@gmail.com>
1 parent 3c0c01c commit ffde923Copy full SHA for ffde923
File tree
Expand file treeCollapse file tree
17 files changed
+415
-41
lines changedFilter options
- src
- compiler
- services
- tests
- baselines/reference
- cases/conformance/directives
Expand file treeCollapse file tree
17 files changed
+415
-41
lines changedsrc/compiler/diagnosticMessages.json
Copy file name to clipboardExpand all lines: src/compiler/diagnosticMessages.json+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2245 | 2245 |
| |
2246 | 2246 |
| |
2247 | 2247 |
| |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
2248 | 2252 |
| |
2249 | 2253 |
| |
2250 | 2254 |
| |
|
+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
915 | 915 |
| |
916 | 916 |
| |
917 | 917 |
| |
| 918 | + | |
918 | 919 |
| |
919 | 920 |
| |
920 | 921 |
| |
| |||
948 | 949 |
| |
949 | 950 |
| |
950 | 951 |
| |
| 952 | + | |
951 | 953 |
| |
952 | 954 |
| |
953 | 955 |
| |
|
+61-41Lines changed: 61 additions & 41 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
3 |
| - | |
4 | 2 |
| |
5 | 3 |
| |
6 | 4 |
| |
| |||
1661 | 1659 |
| |
1662 | 1660 |
| |
1663 | 1661 |
| |
1664 |
| - | |
1665 |
| - | |
1666 |
| - | |
1667 |
| - | |
1668 |
| - | |
1669 |
| - | |
1670 |
| - | |
1671 |
| - | |
1672 |
| - | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
1673 | 1669 |
| |
1674 |
| - | |
| 1670 | + | |
| 1671 | + | |
1675 | 1672 |
| |
1676 | 1673 |
| |
1677 | 1674 |
| |
| |||
1749 | 1746 |
| |
1750 | 1747 |
| |
1751 | 1748 |
| |
1752 |
| - | |
1753 |
| - | |
1754 |
| - | |
1755 |
| - | |
1756 |
| - | |
1757 |
| - | |
1758 |
| - | |
1759 |
| - | |
1760 |
| - | |
1761 |
| - | |
1762 |
| - | |
| 1749 | + | |
1763 | 1750 |
| |
1764 | 1751 |
| |
1765 | 1752 |
| |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
1766 | 1781 |
| |
1767 | 1782 |
| |
1768 | 1783 |
| |
1769 | 1784 |
| |
1770 | 1785 |
| |
1771 | 1786 |
| |
1772 | 1787 |
| |
1773 |
| - | |
| 1788 | + | |
1774 | 1789 |
| |
1775 |
| - | |
| 1790 | + | |
1776 | 1791 |
| |
1777 |
| - | |
1778 |
| - | |
1779 |
| - | |
1780 |
| - | |
1781 |
| - | |
1782 |
| - | |
1783 |
| - | |
1784 |
| - | |
1785 |
| - | |
1786 |
| - | |
1787 |
| - | |
1788 |
| - | |
1789 |
| - | |
1790 |
| - | |
1791 |
| - | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
1792 | 1803 |
| |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1793 | 1812 |
| |
1794 |
| - | |
| 1813 | + | |
| 1814 | + | |
1795 | 1815 |
| |
1796 | 1816 |
| |
1797 | 1817 |
| |
|
+46Lines changed: 46 additions & 0 deletions
Large diffs are not rendered by default.
+20Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2990 | 2990 |
| |
2991 | 2991 |
| |
2992 | 2992 |
| |
| 2993 | + | |
| 2994 | + | |
2993 | 2995 |
| |
2994 | 2996 |
| |
2995 | 2997 |
| |
| |||
3009 | 3011 |
| |
3010 | 3012 |
| |
3011 | 3013 |
| |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
3012 | 3026 |
| |
3013 | 3027 |
| |
3014 | 3028 |
| |
| |||
6667 | 6681 |
| |
6668 | 6682 |
| |
6669 | 6683 |
| |
| 6684 | + | |
| 6685 | + | |
| 6686 | + | |
| 6687 | + | |
| 6688 | + | |
| 6689 | + | |
6670 | 6690 |
| |
6671 | 6691 |
| |
6672 | 6692 |
| |
|
+39Lines changed: 39 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
473 | 501 |
| |
474 | 502 |
| |
475 | 503 |
| |
| |||
914 | 942 |
| |
915 | 943 |
| |
916 | 944 |
| |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
917 | 956 |
| |
918 | 957 |
| |
919 | 958 |
| |
|
+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
614 | 614 |
| |
615 | 615 |
| |
616 | 616 |
| |
| 617 | + | |
617 | 618 |
| |
618 | 619 |
| |
619 | 620 |
| |
|
tests/baselines/reference/ts-expect-error.errors.txt
Copy file name to clipboard+28Lines changed: 28 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 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + |
tests/baselines/reference/ts-expect-error.js
Copy file name to clipboard+29Lines changed: 29 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 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + |
tests/baselines/reference/ts-expect-error.symbols
Copy file name to clipboard+23Lines changed: 23 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 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + |
You can’t perform that action at this time.
0 commit comments