Title: Incorrect report of self-referencing type for static fields · Issue #62552 · microsoft/TypeScript · GitHub
Open Graph Title: Incorrect report of self-referencing type for static fields · Issue #62552 · microsoft/TypeScript
X Title: Incorrect report of self-referencing type for static fields · Issue #62552 · microsoft/TypeScript
Description: 🔎 Search Terms TS7022 implicitly has type 'any' 🕗 Version & Regression Information The issue applies to all TypeScript 5 versions and TypeScript 6 nightly ⏯ Playground Link https://www.typescriptlang.org/play/?ts=6.0.0-dev.20251006#code/...
Open Graph Description: 🔎 Search Terms TS7022 implicitly has type 'any' 🕗 Version & Regression Information The issue applies to all TypeScript 5 versions and TypeScript 6 nightly ⏯ Playground Link https://www.typescriptla...
X Description: 🔎 Search Terms TS7022 implicitly has type 'any' 🕗 Version & Regression Information The issue applies to all TypeScript 5 versions and TypeScript 6 nightly ⏯ Playground Link https://www....
Opengraph URL: https://github.com/microsoft/TypeScript/issues/62552
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect report of self-referencing type for static fields","articleBody":"### 🔎 Search Terms\n\nTS7022\nimplicitly has type 'any'\n\n### 🕗 Version & Regression Information\n\n- The issue applies to all TypeScript 5 versions and TypeScript 6 nightly\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?ts=6.0.0-dev.20251006#code/GYVwdgxgLglg9mABDAJgHgCoD4AUAPALkQwEoiNEBvAKEUQCcBTKEepPagX2uogQGcoiAGJw4iALzIUOCABsAhv35VaiQQtgQGjBSgRyAnomBjJ0nABYATCUQB6e4gCi9enHrEAygHYADNbWXCQ8fGCCiADyANbm8koqNHQaWjp6Bsam4lKoVrYOTgBy4oxuHlzUQA\n\n### 💻 Code\n\n```ts\nfunction id\u003cT>(x: T): T {\n return x\n}\n\nconst Foo = id(class {\n static readonly foo = id(42) // Error TS7022\n})\n\nconst Ok = class {\n static readonly foo = id(42) // No error\n}\n```\n\n\n### 🙁 Actual behavior\n\nType error TS7022 reported\n\n### 🙂 Expected behavior\n\nNo type error\n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/boris-kolar","@type":"Person","name":"boris-kolar"},"datePublished":"2025-10-06T10:21:09Z","url":"https://github.com/microsoft/TypeScript/issues/62552"}
| 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:b55735e5-a315-9b4d-9d9e-24fe5dc88abd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9826:E3C4F:9A03AA:C5AE74:6B00F1AA |
| html-safe-nonce | f13587f5ba0114acc5f16643f12df61b6fd46a20a5149f0f0baa12991b49a66c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODI2OkUzQzRGOjlBMDNBQTpDNUFFNzQ6NkIwMEYxQUEiLCJ2aXNpdG9yX2lkIjoiNDE1MzcwODY0NTIyMzI5NzQ1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | eaa4eb9112899815471c9b61881318b70c4a57a6c5ead2f7075e452e16132264 |
| hovercard-subject-tag | issue:3486570440 |
| 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/62552/issue_layout |
| twitter:image | https://opengraph.githubassets.com/db5e1f06634e6525f7973d24905027b482192f4cee550325a5176256771c2425/microsoft/TypeScript/issues/62552 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/db5e1f06634e6525f7973d24905027b482192f4cee550325a5176256771c2425/microsoft/TypeScript/issues/62552 |
| og:image:alt | 🔎 Search Terms TS7022 implicitly has type 'any' 🕗 Version & Regression Information The issue applies to all TypeScript 5 versions and TypeScript 6 nightly ⏯ Playground Link https://www.typescriptla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | boris-kolar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width