Title: Contextual type of 'any' should be ignored · Issue #6190 · microsoft/TypeScript · GitHub
Open Graph Title: Contextual type of 'any' should be ignored · Issue #6190 · microsoft/TypeScript
X Title: Contextual type of 'any' should be ignored · Issue #6190 · microsoft/TypeScript
Description: getContextuallyTypedParameterType should return undefined instead of any let x: { f(a, b): any, g(): any } = { f: (a = "none", b) => a.length, g: (a = "none", b) { return a.length } } For both f and g, the parameter a: any but should be ...
Open Graph Description: getContextuallyTypedParameterType should return undefined instead of any let x: { f(a, b): any, g(): any } = { f: (a = "none", b) => a.length, g: (a = "none", b) { return a.length } } For both f an...
X Description: getContextuallyTypedParameterType should return undefined instead of any let x: { f(a, b): any, g(): any } = { f: (a = "none", b) => a.length, g: (a = "none", b) { return a.l...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6190
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Contextual type of 'any' should be ignored","articleBody":"`getContextuallyTypedParameterType` should return `undefined` instead of `any`\n\n``` ts\nlet x: { f(a, b): any, g(): any } = {\n f: (a = \"none\", b) => a.length, \n g: (a = \"none\", b) { return a.length }\n}\n```\n\nFor both `f` and `g`, the parameter `a: any` but should be `a: string`.\n\nI also ran into this with implemented/inherited functions in PR #6118.\n","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2015-12-21T18:20:34Z","url":"https://github.com/microsoft/TypeScript/issues/6190"}
| 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:378e0f0f-38d1-4ad5-91cb-ae5ce02678a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9808:1C6C3E:E847E6:132EDB0:6B010054 |
| html-safe-nonce | 89e5ff60af09ecccef5419923bdc148709fd76316e876624cb8f88371569cdc7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODA4OjFDNkMzRTpFODQ3RTY6MTMyRURCMDo2QjAxMDA1NCIsInZpc2l0b3JfaWQiOiIxOTI0NTc2MzU0NjY2MzQ4NjI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 87f72d1d94a9e9d84aa46f4ec79d6e5da8e85ef4a329bdbbeacb242e66a0b60a |
| hovercard-subject-tag | issue:123331579 |
| 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/6190/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0c0ada2d1fd286e520407f774366e4a606f92c63c8663c5d08f70b845ba7e148/microsoft/TypeScript/issues/6190 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0c0ada2d1fd286e520407f774366e4a606f92c63c8663c5d08f70b845ba7e148/microsoft/TypeScript/issues/6190 |
| og:image:alt | getContextuallyTypedParameterType should return undefined instead of any let x: { f(a, b): any, g(): any } = { f: (a = "none", b) => a.length, g: (a = "none", b) { return a.length } } For both f an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sandersn |
| 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