Title: Diagnostic elaboration is not consistently reported in language service · Issue #3276 · microsoft/TypeScript · GitHub
Open Graph Title: Diagnostic elaboration is not consistently reported in language service · Issue #3276 · microsoft/TypeScript
X Title: Diagnostic elaboration is not consistently reported in language service · Issue #3276 · microsoft/TypeScript
Description: Adapted from #3275: class GenericThingamabob
Open Graph Description: Adapted from #3275: class GenericThingamabob
X Description: Adapted from #3275: class GenericThingamabob<T> { constructor(private entity: T) {} add(item: T) { } } class CouponInfo { private couponTag: {}; } class Snake { private snakeTag: {}; } var bl...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/3276
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Diagnostic elaboration is not consistently reported in language service","articleBody":"Adapted from #3275:\n\n``` TypeScript\nclass GenericThingamabob\u003cT> {\n constructor(private entity: T) {}\n add(item: T) { }\n}\n\nclass CouponInfo {\n private couponTag: {};\n}\n\nclass Snake {\n private snakeTag: {};\n}\n\nvar blah = new GenericThingamabob(new CouponInfo());\n\nblah.add(new Snake());\n// ~~~~~~~~~~~\nvar x: CouponInfo = new Snake();\n// ~\n```\n\nOn the first error, I get\n\n```\nArgument of type 'Snake' is not assignable to parameter of type 'CouponInfo'.\n Property 'couponTag' is missing in type 'Snake'\n```\n\nOn the second, I get\n\n```\nType 'Snake' is not assignable to type 'CouponInfo'.\n```\n\nNote that if you turned `blah.add(new Snake());` into a variable assignment like `var a: CouponInfo = new Snake()`, you'll get the same issue.\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2015-05-27T07:07:39Z","url":"https://github.com/microsoft/TypeScript/issues/3276"}
| 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:a259ddbb-84e3-78f8-3956-116d0d72c657 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB0E:16AB79:2C434D7:384DE09:6B01B4E3 |
| html-safe-nonce | 5eae60d4407afcb591186714b72e45b25eb776326129fbb396a84fe8062aa82f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjBFOjE2QUI3OToyQzQzNEQ3OjM4NERFMDk6NkIwMUI0RTMiLCJ2aXNpdG9yX2lkIjoiMTE5MzI4NDY4NTYzMTk2MDI5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8d745ca8121c09a19eff4520bd90bc64307b1657de3d09dd188ed283dd481a96 |
| hovercard-subject-tag | issue:81317143 |
| 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/3276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/30bb72368758f33bcef75ec4ad7c473496cb4e9d6f92d733d1e17ea2a0387705/microsoft/TypeScript/issues/3276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/30bb72368758f33bcef75ec4ad7c473496cb4e9d6f92d733d1e17ea2a0387705/microsoft/TypeScript/issues/3276 |
| og:image:alt | Adapted from #3275: class GenericThingamabob |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width