Title: type: class expression that extends passed argument of generic TypeConstructor is reported incorrectly by typeChecker as intersection of types · Issue #49116 · microsoft/TypeScript · GitHub
Open Graph Title: type: class expression that extends passed argument of generic TypeConstructor is reported incorrectly by typeChecker as intersection of types · Issue #49116 · microsoft/TypeScript
X Title: type: class expression that extends passed argument of generic TypeConstructor is reported incorrectly by typeChecker as intersection of types · Issue #49116 · microsoft/TypeScript
Description: Bug Report 🔎 Search Terms type generic extends class expression 🕗 Version & Regression Information This allways reported incorrect data tested between versions 3.3.x and 4.6.2 ⏯ Playground Link Playground Link Typescript Eslint Ast Explo...
Open Graph Description: Bug Report 🔎 Search Terms type generic extends class expression 🕗 Version & Regression Information This allways reported incorrect data tested between versions 3.3.x and 4.6.2 ⏯ Playground Link Pla...
X Description: Bug Report 🔎 Search Terms type generic extends class expression 🕗 Version & Regression Information This allways reported incorrect data tested between versions 3.3.x and 4.6.2 ⏯ Playground Link...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/49116
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"type: class expression that extends passed argument of generic TypeConstructor is reported incorrectly by typeChecker as intersection of types","articleBody":"# Bug Report\r\n\r\n\u003c!--\r\n Please fill in each section completely. Thank you!\r\n-->\r\n\r\n### 🔎 Search Terms\r\n\r\n- type\r\n- generic extends\r\n- class expression\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n- This allways reported incorrect data tested between versions 3.3.x and 4.6.2\r\n\r\n### ⏯ Playground Link\r\n\r\n[Playground Link](https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABAYQDYEMDOmDqMoAWAcugLYCmAPACoBCW5i5AHlOWACaaJjkDuiABQA6UegBOAc0wAuROjABPANoBdAJSIAvAD5EAbwC+OwfUzk5dBpv0BYAFABIceSghxSCBmxNW7LohmjHb2Do6OAA7iMABu6GyIAPpgZBaImFDRYJIA3A5hkSAARqgwEIhsGYJxqCBpGVmSNgWOhDCYwsmp2og1dXlOjoZhw-ajQA)\r\n\r\n[Typescript Eslint](https://typescript-eslint.io/play/#ts=4.6.4&sourceType=module&code=GYVwdgxgLglg9mABAYQDYEMDOmDqMoAWAcugLYCmAPACoBCW5i5AHlOWACaaJjkDuiABQA6UegBOAc0wAuROjABPANoBdAJSIAvAD5EAbwC+OwfUzk5dBpv0BYAFABIceSghxSCBmxNW7LohmjHb2Do6OAA7iMABu6GyIAPpgZBaImFDRYJIA3A5hkSAARqgwEIhsGYJxqCBpGVmSNgWOhDCYwsmp2og1dXlOjoZhw-aGQA&rules=N4IgAgLgngDgpgZwMYCcCWMIFpEBs0B2EA9DCnAGZwpbkCGAJgPYG5QgBcI1KTKIAXyA&tsConfig=N4XyA)\r\n\r\n[Ast Explorer](https://ts-ast-viewer.com/#code/GYVwdgxgLglg9mABAYQDYEMDOmDqMoAWAcugLYCmAPACoBCW5i5AHlOWACaaJjkDuiABQA6UegBOAc0wAuROjABPANoBdAJSIAvAD5EAbwC+OwfUzk5dBpv0AoAJDjyUEOKQQM2Jq3ZdEZxjsHewAHcRgAN3Q2RAB9MDILREwocLBJAG5bYJCQACNUGAhENhTBKNQQJJS0yRtg+0IYTGF4xO1ECqqs+3tDB37DIA)\r\n\r\n### 💻 Code\r\n\r\n```ts\r\nfunction ClassWithName\u003cTBase extends new (...args: any[]) => {}>(Base: TBase) {\r\n\treturn class A extends Base {\r\n\t}\r\n}\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\nType of ClassExpression that extends generic not default TypeConstructor is incorrectly reported as Intersection without symbol set\r\n\r\n\r\n\r\n### 🙂 Expected behavior\r\n\r\ni expect to receive object with type TypeObject that has Object typeFlag set and properly defined symbol\r\n\r\nThis issue is present only if we extend class by other class thatr is provided by arg of function `\u003cTBase extends new (...args: any[]) => {}>(Base: TBase)` and only if its a generic (template)\r\n\r\nref: https://github.com/typescript-eslint/typescript-eslint/pull/4974","author":{"url":"https://github.com/armano2","@type":"Person","name":"armano2"},"datePublished":"2022-05-15T11:54:49Z","url":"https://github.com/microsoft/TypeScript/issues/49116"}
| 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:d92f6ab4-7260-5069-13b2-7bd115a0b9af |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9162:63875:6F3D8A:9554B7:6B00D7C5 |
| html-safe-nonce | fdccd6cf07a0c47cbdc01c6eff1c04bb4eb938eb7cd366ce1502bfa6447c2c96 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTYyOjYzODc1OjZGM0Q4QTo5NTU0Qjc6NkIwMEQ3QzUiLCJ2aXNpdG9yX2lkIjoiODE1OTc3MDE3NDUwNzIwNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 79ca9f8713ce416961ce5b9b02844e3ec8ec6f2d17c7e23f9d78a1e0c95e376a |
| hovercard-subject-tag | issue:1236266691 |
| 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/49116/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04b375c3137dc40227508405d0d8ff593bfbfccc9f20d913dbf620d28bc09812/microsoft/TypeScript/issues/49116 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04b375c3137dc40227508405d0d8ff593bfbfccc9f20d913dbf620d28bc09812/microsoft/TypeScript/issues/49116 |
| og:image:alt | Bug Report 🔎 Search Terms type generic extends class expression 🕗 Version & Regression Information This allways reported incorrect data tested between versions 3.3.x and 4.6.2 ⏯ Playground Link Pla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | armano2 |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| 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 | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width