Title: Instantiation expressions don't filter signatures with non-matching constraints · Issue #51694 · microsoft/TypeScript · GitHub
Open Graph Title: Instantiation expressions don't filter signatures with non-matching constraints · Issue #51694 · microsoft/TypeScript
X Title: Instantiation expressions don't filter signatures with non-matching constraints · Issue #51694 · microsoft/TypeScript
Description: Bug Report 🔎 Search Terms instantiation expression, overload 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with relevant code 💻 Code declare function foo Open Graph Description: Bug Report 🔎 Search Terms instantiation expression, overload 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with relevant code 💻 ...
X Description: Bug Report 🔎 Search Terms instantiation expression, overload 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with relevant cod...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/51694
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Instantiation expressions don't filter signatures with non-matching constraints","articleBody":"# Bug Report\r\n\r\n### 🔎 Search Terms\r\n\r\ninstantiation expression, overload\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n- This is the behavior in every version I tried\r\n\r\n### ⏯ Playground Link\r\n\r\n[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.9.3#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVJxwB4AVeEADwxFWAGd4BrEATx0XgAkSBZAGQCiEEAFsaGElADmAOShieUAA4A+ABSwpALngkAlDu78ho8ZNnyQipQG0SAXQDcAKFCRYCFOmx4CxMpTUtAxGgsJiqBjqmjr6sS7OGCxKCABiWDB0GKmE8AC88Ekp7H5EAETAWABuZSouQA)\r\n\r\n### 💻 Code\r\n\r\n```ts\r\ndeclare function foo\u003cT extends keyof HTMLElementTagNameMap>(arg: T): HTMLElementTagNameMap[T];\r\ndeclare function foo\u003cT extends HTMLElement>(arg: T): T;\r\n\r\ntype FirstFoo = typeof foo\u003c\"div\">; // Type 'string' does not satisfy the constraint 'HTMLElement'.(2344)\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\nThis instantiation expression errors despite the fact that a matching signature exists.\r\n\r\n### 🙂 Expected behavior\r\n\r\nIt sounds likely that most people would assume that this should work similarly to how overloads are chosen - but instead an intersection is being created based on all signatures with the same type arguments arity.\r\n\r\n_originally reported by @herjiict [here](https://github.com/microsoft/TypeScript/pull/47607#issuecomment-1331744280)_","author":{"url":"https://github.com/Andarist","@type":"Person","name":"Andarist"},"datePublished":"2022-11-30T10:21:14Z","url":"https://github.com/microsoft/TypeScript/issues/51694"}
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:7191d9ac-7509-f3ec-4fd3-0e2b07ccdeab current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id DAF0:1CCECA:49C1F4:62D2CA:6B01A349 html-safe-nonce b2f24478d0098b792aa8ae93727c5d3928b85c50ce8aa2cde3150c372045432b visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUYwOjFDQ0VDQTo0OUMxRjQ6NjJEMkNBOjZCMDFBMzQ5IiwidmlzaXRvcl9pZCI6Ijc1MjM5MTIzMDc3ODk4OTg1NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac 9a26cee0a42ca5275d199d44d48af8ed4d28d3cf5c4ce29304f7f9da9225177a hovercard-subject-tag issue:1469390468 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/51694/issue_layout twitter:image https://opengraph.githubassets.com/4b08dfdb7e5aed1795378c25a1f638b0be8a166a8173aac9c9a4d49aa15486de/microsoft/TypeScript/issues/51694 twitter:card summary_large_image og:image https://opengraph.githubassets.com/4b08dfdb7e5aed1795378c25a1f638b0be8a166a8173aac9c9a4d49aa15486de/microsoft/TypeScript/issues/51694 og:image:alt Bug Report 🔎 Search Terms instantiation expression, overload 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with relevant code 💻 ... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username Andarist 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
URLs of crawlers that visited me.