Title: Flow analusys error in unreachable code · Issue #63263 · microsoft/TypeScript · GitHub
Open Graph Title: Flow analusys error in unreachable code · Issue #63263 · microsoft/TypeScript
X Title: Flow analusys error in unreachable code · Issue #63263 · microsoft/TypeScript
Description: 🔎 Search Terms errors in unreachable code, unreachable code flow analysys 🕗 Version & Regression Information all available on www.typescriptlang.org/play versions, from 3.3 to 5.9.3 and nightly ⏯ Playground Link https://www.typescriptlan...
Open Graph Description: 🔎 Search Terms errors in unreachable code, unreachable code flow analysys 🕗 Version & Regression Information all available on www.typescriptlang.org/play versions, from 3.3 to 5.9.3 and nightly ⏯ P...
X Description: 🔎 Search Terms errors in unreachable code, unreachable code flow analysys 🕗 Version & Regression Information all available on www.typescriptlang.org/play versions, from 3.3 to 5.9.3 and nightly...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/63263
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Flow analusys error in unreachable code","articleBody":"### 🔎 Search Terms\n\nerrors in unreachable code, unreachable code flow analysys\n\n### 🕗 Version & Regression Information\n\nall available on www.typescriptlang.org/play versions, from 3.3 to 5.9.3 and nightly\n\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?allowUnreachableCode=true&ssl=18&ssc=2&pln=1&pc=1#code/GYVwdgxgLglg9mABFApgZygRgBQQEYBciAYuNPEgD6JggA2dAlIgN4BQiniMwi2AhPmbsuoxPkQBeGigDuJMrATZGAbg5cAvhs4AnFAEcAwnlx41bbW1CQlSVBgBMZoqVsVE1Wg2E7E+qBBdMHVRHj5Bc1Y-UQlpMDkFd2ULUW1RfWNTIXUrG3IEf0MTFzcCsEZ2SyA\n\n### 💻 Code\n\n```ts\nfunction test1(cb: Function | null) {\n if (!cb) {\n cb = new Function();\n }\n reqCb(cb);\n}\n\nfunction test2(cb: Function | null) {\n return;\n if (!cb) {\n cb = new Function();\n }\n reqCb(cb); // Argument of type 'Function | null' is not assignable to parameter of type 'Function'. Type 'null' is not assignable to type 'Function'.(2345)\n}\n\nfunction reqCb(cb:Function){\n\n}\n```\n\n\n### 🙁 Actual behavior\n\n Argument of type 'Function | null' is not assignable to parameter of type 'Function'. Type 'null' is not assignable to type 'Function'.(2345)\n\n### 🙂 Expected behavior\n\nno error\n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/Busyrev","@type":"Person","name":"Busyrev"},"datePublished":"2026-03-18T10:18:48Z","url":"https://github.com/microsoft/TypeScript/issues/63263"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:c7b670b1-073d-ed27-fa2d-ba0ae5c36272 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C840:875BD:2E6836:3EE568:6B04ED97 |
| html-safe-nonce | 26e4dc11b0f80d7add083262cb060d7043da2082bb22cca859735def39d813aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODQwOjg3NUJEOjJFNjgzNjozRUU1Njg6NkIwNEVEOTciLCJ2aXNpdG9yX2lkIjoiNTA4OTA3MzkxNTgwMDkwNzE1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 78ffb5a576face8824112e3e79a2d58f469839364990e8b30b76884be744a089 |
| hovercard-subject-tag | issue:4094140087 |
| 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/63263/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca6cf53d83d73da1fc6cc4c995f57ec6d1c771b806ffcfe9724ab5ff65fbbfa2/microsoft/TypeScript/issues/63263 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca6cf53d83d73da1fc6cc4c995f57ec6d1c771b806ffcfe9724ab5ff65fbbfa2/microsoft/TypeScript/issues/63263 |
| og:image:alt | 🔎 Search Terms errors in unreachable code, unreachable code flow analysys 🕗 Version & Regression Information all available on www.typescriptlang.org/play versions, from 3.3 to 5.9.3 and nightly ⏯ P... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Busyrev |
| hostname | github.com |
| expected-hostname | github.com |
| None | f3851aad500d8e8dce736722ddc6fa9596e17d9fce3c53581eba968664c0bc32 |
| 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 | e29c922455fd8137f27e1cfcdf6a1e8b920b1926 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width