Title: 7.1 regression: TS5115 for import("cloudflare:workers") with @cloudflare/workers-types · Issue #65445 · microsoft/TypeScript · GitHub
Open Graph Title: 7.1 regression: TS5115 for import("cloudflare:workers") with @cloudflare/workers-types · Issue #65445 · microsoft/TypeScript
X Title: 7.1 regression: TS5115 for import("cloudflare:workers") with @cloudflare/workers-types · Issue #65445 · microsoft/TypeScript
Description: 🔎 Search Terms TS5115, "appear infinitely circular", MaybeCallableProvider, MethodOrProperty, cloudflare:workers, workers-types, dynamic import 🕗 Version & Regression Information This changed between versions 7.1.0-dev.20260721.1 (passes...
Open Graph Description: 🔎 Search Terms TS5115, "appear infinitely circular", MaybeCallableProvider, MethodOrProperty, cloudflare:workers, workers-types, dynamic import 🕗 Version & Regression Information This changed betwe...
X Description: 🔎 Search Terms TS5115, "appear infinitely circular", MaybeCallableProvider, MethodOrProperty, cloudflare:workers, workers-types, dynamic import 🕗 Version & Regression Information This...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/65445
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"7.1 regression: TS5115 for import(\"cloudflare:workers\") with @cloudflare/workers-types","articleBody":"### 🔎 Search Terms\n\nTS5115, \"appear infinitely circular\", MaybeCallableProvider, MethodOrProperty, cloudflare:workers, workers-types, dynamic import\n\n### 🕗 Version & Regression Information\n\n- This changed between versions `7.1.0-dev.20260721.1` (passes) and `7.1.0-dev.20260722.1` (fails). I did not bisect to a commit.\n- Fails on `7.1.0-beta` and on `7.1.0-dev.20261111.1` (current `next`). Passes on `7.0.2`.\n- Not a duplicate of #65440 or #64605: those have different code and no external types. The error code is the same.\n\n### ⏯ Playground Link\n\nNo link: the code needs the `@cloudflare/workers-types` package, which the Playground does not have.\n\n### 💻 Code\n\nSetup (npm, any empty folder):\n\n```\nnpm i -D typescript@7.1.0-beta @cloudflare/workers-types@5.20261110.1\n```\n\n`tsconfig.json`:\n\n```json\n{\n \"compilerOptions\": {\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"noEmit\": true,\n \"skipLibCheck\": true,\n \"types\": [\"@cloudflare/workers-types\"]\n },\n \"files\": [\"index.ts\"]\n}\n```\n\n`index.ts` (one line):\n\n```ts\nimport(\"cloudflare:workers\").then((mod) => mod);\n```\n\nRun `npx tsc -p .`\n\n`@cloudflare/workers-types` 5.20261104.1 fails the same way. `await import(\"cloudflare:workers\")` without `.then` passes. A non-callback use of the module passes.\n\n### 🙁 Actual behavior\n\n```\n$ npx tsc -v\nVersion 7.1.0-beta\n$ npx tsc -p .\nindex.ts(1,1): error TS5115: Instantiations of the following types appear infinitely circular: 'MethodOrProperty', 'MaybeCallableProvider'.\n```\n\n`7.1.0-dev.20261111.1` prints the same error. In a bigger program the same cause also makes the result of a call on a `DurableObjectStub\u003cT>` (RPC types from the same package) become `any`, which then gives TS7006 on callback parameters.\n\n### 🙂 Expected behavior\n\nNo error, as in `7.0.2`:\n\n```\n$ npx tsc -v\nVersion 7.0.2\n$ npx tsc -p .\n$ echo $?\n0\n```\n\nThe types in `@cloudflare/workers-types` are valid and `7.0.2` accepts them.\n\n### Additional information about the issue\n\nTested on Linux with Node 24. Package `@cloudflare/workers-types` is `5.20261110.1` (latest).\n","author":{"url":"https://github.com/alon-gb","@type":"Person","name":"alon-gb"},"datePublished":"2026-11-11T16:27:31Z","url":"https://github.com/microsoft/TypeScript/issues/65445"}
| 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:4b41c603-b055-b096-b4df-4097c8993fbd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8306:38E318:2D709D:391AD7:6B0101E8 |
| html-safe-nonce | a3ed74beef053f7c06ef1825219227bbd49c480f9f93e5155c39a0c1e13a5984 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzA2OjM4RTMxODoyRDcwOUQ6MzkxQUQ3OjZCMDEwMUU4IiwidmlzaXRvcl9pZCI6IjE0NTc3ODM5NzE2MDg4NTUwMTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e67c91710414f910c62b062442f1874f87cbce14dca1989c69fc68811563859c |
| hovercard-subject-tag | issue:6332699442 |
| 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/65445/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b2ca7aac96fc7c8164308463ab9738ff24d510c4fb88b1c66e16ab671ebbe801/microsoft/TypeScript/issues/65445 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b2ca7aac96fc7c8164308463ab9738ff24d510c4fb88b1c66e16ab671ebbe801/microsoft/TypeScript/issues/65445 |
| og:image:alt | 🔎 Search Terms TS5115, "appear infinitely circular", MaybeCallableProvider, MethodOrProperty, cloudflare:workers, workers-types, dynamic import 🕗 Version & Regression Information This changed betwe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alon-gb |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width