Title: Inconsistent tsc behavior on TS 5.4 · Issue #58175 · microsoft/TypeScript · GitHub
Open Graph Title: Inconsistent tsc behavior on TS 5.4 · Issue #58175 · microsoft/TypeScript
X Title: Inconsistent tsc behavior on TS 5.4 · Issue #58175 · microsoft/TypeScript
Description: 🔎 Search Terms "tsc inconsistent behavior", "tsc 0 errors", "ts 5.4 bug", "5.4.0-dev.20240219" 🕗 Version & Regression Information I wanted to update TS in our project from v5.3.3 to v5.4.3. And I noticed several weird things: When I was ...
Open Graph Description: 🔎 Search Terms "tsc inconsistent behavior", "tsc 0 errors", "ts 5.4 bug", "5.4.0-dev.20240219" 🕗 Version & Regression Information I wanted to update TS in our project from v5.3.3 to v5.4.3. And I n...
X Description: 🔎 Search Terms "tsc inconsistent behavior", "tsc 0 errors", "ts 5.4 bug", "5.4.0-dev.20240219" 🕗 Version & Regression Information I wanted to update TS i...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/58175
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent tsc behavior on TS 5.4","articleBody":"### 🔎 Search Terms\r\n\r\n\"tsc inconsistent behavior\", \"tsc 0 errors\", \"ts 5.4 bug\", \"5.4.0-dev.20240219\"\r\n\r\n### 🕗 Version \u0026 Regression Information\r\n\r\nI wanted to update TS in our project from `v5.3.3` to `v5.4.3`. And I noticed several weird things:\r\n- When I was switching TS version in VS Code, it wasn't showing any errors. But `tsc --noEmit` was showing 2 errors. I thought that VS Code was just not ready to support `v5.4.3` yet. But the new version comes with `v5.4.3` and it still doesn't work correctly.\r\n- I run `tsc --noEmit`. It shows `2 errors`. If I open a problematic file and put `// @ts-expect-error`, it shows only `1 error`. But if I remove that line, it instantly shows `0 errors`.\r\n\r\nThis changed between versions `5.4.0-dev.20240218` and `5.4.0-dev.20240219`.\r\n\r\n`5.4.0-dev.20240219` is the first version where I see this problem. I checked `@next` version which is `5.5.0-dev.20240412` and the error is still there.\r\n\r\nUnfortunately, I wasn't able to make a reproducible example due complexity of the code. But both errors are about `unknown` type where it should be detected just fine.\r\n\r\n### ⏯ Playground Link\r\n\r\n_No response_\r\n\r\n### 💻 Code\r\n\r\n_No response_\r\n\r\n### 🙁 Actual behavior\r\n\r\n- It doesn't show errors in VS Code\r\n- It shows errors in a console. But after applying `// @ts-expect-error` and removing that line, it shows `0 errors`.\r\n\r\n### 🙂 Expected behavior\r\n\r\n- Errors in VS Code are detected\r\n- It shows errors in a console. After applying `// @ts-expect-error` and removing that line, it shows all previous errors.\r\n\r\n### Additional information about the issue\r\n\r\n_No response_","author":{"url":"https://github.com/olegafx","@type":"Person","name":"olegafx"},"datePublished":"2024-04-12T22:47:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/58175/TypeScript/issues/58175"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f814a0ce-195a-3a9f-6e78-99d6c9c3b967 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FFA:D6D75:30763A:407317:6A614E91 |
| html-safe-nonce | 452ffda2ca0d8a3c00935747f0b987a760c169080c03bb44300f11364049f004 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkZBOkQ2RDc1OjMwNzYzQTo0MDczMTc6NkE2MTRFOTEiLCJ2aXNpdG9yX2lkIjoiOTYwNTExMDczMjI0NTc2NjU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8e5dc84334486d26bded6affe5305039b83819032d3ad7be85c77bae2669ddfe |
| hovercard-subject-tag | issue:2241078549 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/58175/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fbc0e179740f931c36da8660010976e1bc087d8d6629f5407c0ed968b3386184/microsoft/TypeScript/issues/58175 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fbc0e179740f931c36da8660010976e1bc087d8d6629f5407c0ed968b3386184/microsoft/TypeScript/issues/58175 |
| og:image:alt | 🔎 Search Terms "tsc inconsistent behavior", "tsc 0 errors", "ts 5.4 bug", "5.4.0-dev.20240219" 🕗 Version & Regression Information I wanted to update TS in our project from v5.3.3 to v5.4.3. And I n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | olegafx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 35b919fdb8e6752d2ed95a144e761ca5e924557563e2ed0a5ebf6c4430cdeeb6 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1e22b08b60ccb67c3791f565bed248565260e611 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width