Title: Poor parameter help for `...args` when inferring from multiple argument lists · Issue #26132 · microsoft/TypeScript · GitHub
Open Graph Title: Poor parameter help for `...args` when inferring from multiple argument lists · Issue #26132 · microsoft/TypeScript
X Title: Poor parameter help for `...args` when inferring from multiple argument lists · Issue #26132 · microsoft/TypeScript
Description: TypeScript Version: 3.1.0-dev.20180730 Code type Rec = { foo: (a: string, b: number) => void, bar: (b: boolean, c: RegExp) => void, } type Parameters Open Graph Description: TypeScript Version: 3.1.0-dev.20180730 Code type Rec = { foo: (a: string, b: number) => void, bar: (b: boolean, c: RegExp) => void, } type Parameters X Description: TypeScript Version: 3.1.0-dev.20180730 Code type Rec = { foo: (a: string, b: number) => void, bar: (b: boolean, c: RegExp) => void, } type Parameters<T> = T extends (...args: infer U) =...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26132
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Poor parameter help for `...args` when inferring from multiple argument lists","articleBody":"**TypeScript Version:** 3.1.0-dev.20180730\r\n\r\n**Code**\r\n\r\n```ts\r\ntype Rec = {\r\n foo: (a: string, b: number) => void,\r\n bar: (b: boolean, c: RegExp) => void,\r\n}\r\n\r\ntype Parameters\u003cT> = T extends (...args: infer U) => any ? U : never;\r\n\r\ndeclare var fn: \u003cK extends keyof Rec>(e: K, ...args: Parameters\u003cRec[K]>) => void;\r\nfn('foo', /* get parameter help here */);\r\n```\r\n\r\n**Expected behavior:**\r\nSince I've provided `'foo'`, the only acceptable parameters to follow are a: string, b: number.\r\n\r\n**Actual behavior:**\r\nParameter help shows me the union of all possible types for `...args` including ones that will give me a type error if I use them.","author":{"url":"https://github.com/bterlson","@type":"Person","name":"bterlson"},"datePublished":"2018-08-01T22:05:15Z","url":"https://github.com/microsoft/TypeScript/issues/26132"}
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:a366153f-0b8f-1faa-5fc1-a5ad379ecfa9 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id CDB0:281ABB:4B54A0:67876D:6B046FE9 html-safe-nonce 9a12dc1250ebaaa5d95440307f221bb3fe5825fb13971362c76e990bc64acb26 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREIwOjI4MUFCQjo0QjU0QTA6Njc4NzZEOjZCMDQ2RkU5IiwidmlzaXRvcl9pZCI6IjUwMDQyNjkxNDY1OTEyMjc4ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac 17ed88eb09bc1699ad1cde570250fc0518269bbd92485827bba0f4e5079f7bef hovercard-subject-tag issue:346787014 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/26132/issue_layout twitter:image https://opengraph.githubassets.com/674dd74d6347acce93e1ab8d56bf4b2b4627e4c5b1dc112c78ac6b1989cae4bd/microsoft/TypeScript/issues/26132 twitter:card summary_large_image og:image https://opengraph.githubassets.com/674dd74d6347acce93e1ab8d56bf4b2b4627e4c5b1dc112c78ac6b1989cae4bd/microsoft/TypeScript/issues/26132 og:image:alt TypeScript Version: 3.1.0-dev.20180730 Code type Rec = { foo: (a: string, b: number) => void, bar: (b: boolean, c: RegExp) => void, } type Parameters og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username bterlson hostname github.com expected-hostname github.com None ae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f 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 cfb5f24c6e01d85f70804652a5107e5cac03a161 ui-target full theme-color #1e2327 color-scheme light dark react-app-name issues
Response headers:
Server github.com Content-Type text/html; charset=utf-8 Cache-Control max-age=0, private, must-revalidate
URLs of crawlers that visited me.