René's URL Explorer Experiment


Title: generic type parameters, for generic call expressions, not reduced to canonical form, causing type inference malfuction and errors · Issue #56702 · microsoft/TypeScript · GitHub

Open Graph Title: generic type parameters, for generic call expressions, not reduced to canonical form, causing type inference malfuction and errors · Issue #56702 · microsoft/TypeScript

X Title: generic type parameters, for generic call expressions, not reduced to canonical form, causing type inference malfuction and errors · Issue #56702 · microsoft/TypeScript

Description: 🔎 Search Terms type reduction fails generic function return type inference fails Couldn't find any issues that match this one sufficiently. 🕗 Version & Regression Information This is the behavior in every version I tried up to 5.3.2. ⏯ P...

Open Graph Description: 🔎 Search Terms type reduction fails generic function return type inference fails Couldn't find any issues that match this one sufficiently. 🕗 Version & Regression Information This is the behavior i...

X Description: 🔎 Search Terms type reduction fails generic function return type inference fails Couldn't find any issues that match this one sufficiently. 🕗 Version & Regression Information This is the be...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/56702

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"generic type parameters, for generic call expressions, not reduced to canonical form, causing type inference malfuction and errors","articleBody":"### 🔎 Search Terms\r\n\r\n- type reduction fails \r\n- generic function return type inference fails\r\n\r\nCouldn't find any issues that match this one sufficiently.\r\n\r\n\r\n### 🕗 Version & Regression Information\r\n\r\nThis is the behavior in every version I tried up to 5.3.2.\r\n\r\n### ⏯ Playground Link\r\n\r\n[playground](https://www.typescriptlang.org/play?ts=5.3.2#code/JYWwDg9gTgLgBAbzgEwKYDMCGBXANvTAZzgBI4BfOdKCEOAcgCsBHbVKAT3oG4AoUSLDgApAIptOVGnSat2XPrwDGEAHaF4MAIwAuOBqjBVAczgAfEePkAeABIAVALIAZAKK5UIVKpgA+c3DYqmjoRqjIcAC8pAAUAJTccAD0SXCqEHDsNFC8ymoacDAATHoxMQZGphZiEhx2Tm4eXj6+cXAAZHDlMIYmATU2Di7unt5+AUEhYchxbRaTGNNRsQnJqVnQvClwO3AAfntbqfYcYKgMA5zWFX0WQ42jLfRwwMTpBISEwMaqmABGHkKGRgp3O9DKNyqllq9WGTTGrQ6XUh-SsV3uI2a43mwUWqnCswmuNC+OQ9AAdEcdiczhc0XUUXcGpiEc9XmkIB8vj9-oCYMDQXSYRj4U9KdtdjSwYy4CLHjA2W9OXAiNzfgDzvzCoL6HKsRSqbtqTrIYqOVzvuq+QLabrmaKFeSYkUAMxFIpxXIqdSaLS6fQ9Sqo4X2+X+aIkeKJbbpTJQbJe-K+krIwO3aGDUNYxGdbq9KGXOp6hFEqaktoRqNrOMJiU7A5UqVCmwy4tPF5Ki08jVA7W2mWF2EPbMBPNBzqDtt+OZdSdZkudSFxA0Spv0Qet+ft9nvFWfS28zU2sFzuFhg15H0ZzgAfRR0Q3aeMvmj63jm22a9NKAgqE7+kwGBXnQDhCgAC3Ob0DEwIx4HoFkfApZ0XQAFhQz1PxNJ9nmQX9-0IQDgNAmAILgKCehgnwGCnJDXTQjDjiw-McLw80AKAwgQPAyCkygSi4IABVwSiAHk-kYVAlBgaxMFUDhfFo1D0N4IA)\r\n\r\n### 💻 Code\r\n\r\n```ts\r\nimport { default as $ } from 'jquery';\r\nimport JQuery from 'jquery';\r\n\r\nconst t1: string | JQuery\u003cHTMLElement> | undefined = $(); // no error\r\n\r\nconst t2: ((string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined)) | undefined = $(); // error\r\n//    ~~\r\n// Type 'JQuery\u003cstring | HTMLElement>' is not assignable to type '((string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined)) | undefined'.\r\n//  Type 'JQuery\u003cstring | HTMLElement>' is not assignable to type 'JQuery\u003cHTMLElement>'.\r\n//    Type 'string | HTMLElement' is not assignable to type 'HTMLElement'.\r\n//      Type 'string' is not assignable to type 'HTMLElement'.(2322)\r\n\r\nconst t11: string | JQuery\u003cHTMLElement> = $(); // no error\r\n\r\nconst t12: (string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined) = $(); // error\r\n//    ~~\r\n// Type 'JQuery\u003cstring | HTMLElement>' is not assignable to type 'string | JQuery\u003cHTMLElement> | (string & JQuery\u003cHTMLElement>) | (JQuery\u003cHTMLElement> & string)'.\r\n//  Type 'JQuery\u003cstring | HTMLElement>' is not assignable to type 'JQuery\u003cHTMLElement>'.\r\n\r\nconst JQuery_string = JQuery\u003cstring>; // error\r\n// Type 'string' does not satisfy the constraint 'Element'.(2344)\r\n// Type 'string' does not satisfy the constraint 'HTMLElement'.(2344)\r\n// Type 'string' does not satisfy the constraint 'PlainObject\u003cany>'.(2344)\r\n```\r\n\r\n\r\n### 🙁 Actual behavior\r\n\r\n1.  Even though the type declarations for `t1` and `t2` are the same (after reduction), only `t2` shows an error.  The same relationship exists between `t11` and `t12`.  \r\n\r\n2. The return type of assigned to `t1` is  `string | JQuery\u003cHTMLElement> | undefined`.\r\n\r\n### 🙂 Expected behavior\r\n\r\n1.  `t1` and `t2` should have the same error status.  Likewise for `t11` and `t12`.\r\n\r\n2.  The jQuery function `$()` has a generic signature `\u003cTElement=HTMLElement>() JQuery\u003cTElement>`.  So the return type assigned to `t1` should be `JQuery\u003cstring> | JQuery\u003cHTMLElement> | JQuery\u003cundefined>`.\r\n\r\n3.  As shown at the bottom of the code,  `JQuery\u003cstring>` is judged to be an invalid instantiation of JQuery.  If so, the lines with `t1` and `t2` should both be errors, but they are not.  However, the actual declaration for the interface JQuery seems to be \r\n```\r\ninterface JQuery\u003cTElement = HTMLElement> extends Iterable\u003cTElement>\r\n```\r\nwhich actually doesn't look as though it should constraint the domain of JQuery to HTMLElement, so perhaps `JQuery\u003cstring>` should not be an error?   Furthermore, from within a `DefinitelyTyped/semantic-ui` test file, `JQuery\u003cstring>`  does not incur an error.\r\n\r\n### Additional information about the issue\r\n\r\n#### Origin of strange declaration type\r\n\r\nI explain where the weird declaration types (e.g.  `(string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined) `) came from.\r\n\r\nThe following is quoted and condensed from filles under `DefinitelyTyped/semantic-ui-search`\r\n```\r\nimport { default as $ } from 'jquery';\r\n\r\ninterface _Impl {\r\n    stateContext: string | JQuery;\r\n};\r\n\r\ntype Param =\r\n    & (\r\n        | Pick\u003c_Impl, \"stateContext\">\r\n    )\r\n    & Partial\u003cPick\u003c_Impl, keyof _Impl>>;\r\n```\r\nThe type of `Param[\"stateContext\"]` is indeed the weird type:\r\n```\r\ntype StateContext = Param[\"stateContext\"];\r\n//   ^?  (string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined)\r\n```\r\nThe error can then be incurred as follows:\r\n```\r\nconst p: Param = {\r\n    stateContext: $()\r\n//  ~~\r\n// Type 'JQuery\u003cstring | HTMLElement>' is not assignable \r\n// to type '(string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined)'.(2322)\r\n}\r\n```\r\n[playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgEwKYDMCGBXANvTAZzgBI4BfOdKCEOAcgCsBHbVKAT3oG4AoX4ADsY7LAGNUcAPoBJcLkS84yuIRiYRAYQjDUADxgAuVTChCA5nAA+cAFIBFNpz7k+vGBzCSACpiiY6AF4lFQAyOAAKEJUVG29gMQBrAB5ZeQAaOAAiNQ1UbV0DLIA+aLgASjLw31hgTFxk+KTUuTBcTMTUDgh0aVbcYuK3Dy84AGV1LR0RAzhAuBqAgG0cyfzp-RgsgF0+AHo9lQA9AH5lCLUzQUsbBycOZIAJABUAWQAZAFFcVBBUYWK5Tg4Qupgs1jsjnYDxeH2+v3+MGKEOwgjQ6CEqGQlV4Yh0ajgYGMiyCihiuSmhSMpAilQOygAfgzePTnp5JPQ7tDkpdwTZYV8fn8AfQ4MBiIIIARCIRgOZBJgAEY-OAsw4wCBwEYc0FXG6Q+5PN6ChEAoEg3nXCFczhGuFCxHImyo9GY7H0AB0EQATABmb3eyrkXhAA)\r\n\r\n#### Relation to issue #56013 and pull #56373\r\n\r\nThe submitted pull pull #56373 for the bug in issue #56013 resulted in [similar errors](https://github.com/microsoft/TypeScript/pull/56373#issuecomment-1828763860) to this report.  That's because the bug #56013 is due to improper caching of generic call expression arguments, resulting in the call expression not be re-evaluated when the context changed.  When the fix allows that later evaluation, those latent errors appear in the existing test code under `DefinitelyTyped/semantic-ui`.  \r\n\r\nAn obvious \"patchy\" fix would be to write new code to force reduction just in time at the critical point - but it could be called multiple times.  A better fix would be to do the reduction once when the declaration is parsed - but there is likely some reason it wasn't done that way.  Some feedback from the original designers would be helpful.\r\n\r\n\r\n-----------------------------------------------------------------------------------\r\nUPDATE:\r\n\r\n## Stand alone code with pseudo jQuery\r\n\r\n```\r\ninterface JQuery\u003cTElement = HTMLElement> {\r\n    something: any;\r\n    // Change `[Symbol.iterator]` to `other` and the error goes away\r\n    [Symbol.iterator]: () => {\r\n        // Change `next` to `foo` and the error goes away\r\n        next(): {\r\n            value: TElement;\r\n        }\r\n        | {\r\n            done: true;\r\n            value: any;\r\n        };\r\n    }\r\n}\r\n\r\ndeclare function jQuery\u003cTElement = HTMLElement>(): JQuery\u003cTElement>;\r\n\r\nconst t11: string | JQuery\u003cHTMLElement> = jQuery(); // no error\r\n\r\nconst t12: (string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined) = jQuery(); // error\r\n//    ~~\r\n// Type 'JQuery\u003cstring | HTMLElement>' is not assignable to type '(string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined)'.\r\n//   Type 'JQuery\u003cstring | HTMLElement>' is not assignable to type 'JQuery\u003cHTMLElement>'.ts(2322)\r\n\r\nconst ta: string  = jQuery(); // error\r\n//                  ?^ jQuery\u003cHTMLElement>(): JQuery\u003cHTMLElement>\r\nconst tb: JQuery\u003cHTMLElement>  = jQuery(); // no error\r\n//                               ^? jQuery\u003cHTMLElement>(): JQuery\u003cHTMLElement>\r\nconst tc: string & JQuery\u003cHTMLElement>  = jQuery(); // error\r\n//                                        ^? // jQuery\u003cHTMLElement>(): JQuery\u003cHTMLElement>\r\nconst td: JQuery\u003cHTMLElement> & string  = jQuery(); // error\r\n//                                        ?^ // jQuery\u003cstring>(): JQuery\u003cstring>\r\n```\r\n[playground](https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgFIEUCu0CeAeAFQFEAbCAWwnGQF5kAJAgWQBlSKqwA+ZAbwChkQ5AGcA9pTAALUAHMAXMjggcAbkHCA9JuQBhKctkoABgG0AyjnIAjMSQB0wSFDhgxUALrHkb5MbHS0N7KACY+UijQUO7IsmIQIkoA7nA4GkIWVrYOTtCu7h6KABQAlLQ8AsJVyNp6BiBGfiAQAB5g3r7GMGJiwSBhgchRMXEJyanp1c1tpYqV1QsAbnAk2IrEZJTg6gtCAL6TVQA+fIe7IWLNimBQ2Du7VcurEIrKamf79-v8B-whEAgSHAoCgYJgQAgwMBLsgAFZYXCEdhbMC0BjMNibThcWZoBFQfAbDjgLjqfgIS4iVFgACMNMUVKgcmQJww2AJeEYrGR2LR8PZOFKqhqOhAYiGUGiUH45Mp1JpACZiozmaz8fguZjidwygAyZBFFUNFl4gWcjE8kkm8H-GCgCAhMp0fm4IUiiVS-i1YQAPx9Xp0BBwAAcUAByNmIo2yE2ay3cMPIYCJMWouAiETAWQgODWMg+cVgEPhw03VWmxFxrEkvUG6MmyMcqvangnG0QO3NR1h+wB4RB0PICPqvD1k7NlFcRPJ5CppQZrM5vMoXxFwfDs0T7E9sAiIoKgDMCoVJRlFJAVJ8cAZZeNfPVbtqw2l3oeDwA-AA9OEjrck3GNhqFrVtwsoXtS1iKIB5rciBPD3gKj6iuKz59m+6EYZ+74-puwEtgBv54ZOYGXmACA3kyxr6tBf7cEIzoPiUwpPpK7hoRhHGcUIWHui6TZEdiBG4bBLYkdSIRQYRImTsg+r1ghrpMe6qGvlxakft+tR8fg0Y4iUklmrpQA)\r\n\r\n## Debugging analyis using the above code for the psuedo-JQuery\r\n\r\nIn the declaration\r\n```\r\nt12: (string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined) = jQuery()\r\n```\r\nthe type\r\n```\r\n(string | JQuery\u003cHTMLElement>) & (string | JQuery\u003cHTMLElement> | undefined)\r\n```\r\nis reduced to union of these 4 types\r\n\r\n- `string`\r\n- `JQuery\u003cHTMLElement>`\r\n- `string & JQuery\u003cHTMLElement>`\r\n- `JQuery\u003cHTMLElement> & string`\r\n\r\n`inferTypes` tries to infer `TElement` in\r\n```\r\n\u003cTElement = HTMLElement>jQuery(): JQuery\u003cTElement>\r\n```\r\nby independently inferring for `TElement` from each of the 4 types above,\r\nto get the following candidates:\r\n\r\n- source: `string`, target:`JQuery\u003cTElement>`\r\n     - candidate for `TElement`: (none)\r\n- source: `JQuery\u003cHTMLElement>`, target:`JQuery\u003cTElement>`\r\n     - candidate for `TElement`: `HTMLElement`\r\n- source: `string & JQuery\u003cHTMLElement>`, target:`JQuery\u003cTElement>`\r\n     - candidate for `TElement`: `HTMLElement` (repeat, ignored)\r\n- source: `JQuery\u003cHTMLElement> & string`, target:`JQuery\u003cTElement>``\r\n     - candidate for `TElement`: `string`\r\n\r\nThen it takes the union `string | HTMLElement` so the final return type is `JQuery\u003cstring | HTMLElement>`.\r\n\r\n\r\nThe most noticeable problem is the result for:\r\n\r\n- source: `JQuery\u003cHTMLElement> & string`, target:`JQuery\u003cTElement>`\r\n     - candidate for `TElement`: `string`\r\n\r\nThat happens because `inferTypes` calls `getApparentType(JQuery\u003cHTMLElement> & string)`\r\nwhich promotes `string` to `String`.\r\n\r\nThen `JQuery\u003cHTMLElement> & String` is object whose properties are compared to the properties of `JQuery\u003cTElemet>`.\r\n\r\n\r\nThey both share `[[Symbol.iterator]]` as a property the the properties\r\n\r\n- source: `(() => { next(): { done: true; value: any; } | { value: HTMLElement; }; }) & (() => IterableIterator\u003cstring>)`\r\n- target: `\"() => { next(): { done: true; value: any; } | { value: TElement; }; }\"`\r\n\r\nbecome a valid source-target pair for inference in the function\r\n```\r\nfunction inferFromSignatures(source: Type, target: Type, kind: SignatureKind) {\r\n     const sourceSignatures = getSignaturesOfType(source, kind);\r\n     const sourceLen = sourceSignatures.length;\r\n     if (sourceLen > 0) {\r\n          // We match source and target signatures from the bottom up, and if the source has fewer signatures\r\n          // than the target, we infer from the first source signature to the excess target signatures.\r\n          const targetSignatures = getSignaturesOfType(target, kind);\r\n          const targetLen = targetSignatures.length;\r\n          for (let i = 0; i \u003c targetLen; i++) {\r\n              const sourceIndex = Math.max(sourceLen - targetLen + i, 0);\r\n              inferFromSignature(getBaseSignature(sourceSignatures[sourceIndex]), getErasedSignature(targetSignatures[i]));\r\n          }\r\n     }\r\n}\r\n```\r\n- Here the source intersection is treated as an array of signatures.\r\n- Notice that the source signatures are of length 2, but the target signature is of length 1.\r\n- The code matches each of the target signatures to some source signature, but because there are more source signatures than target signature, the first source signature is ignored.\r\n\r\nEach match potentially contributes a candidates.  In this case the deep match stack is as follows:\r\n\r\n-\r\n    - `(...args: [] | [undefined]) => IteratorResult\u003cstring, any>`\r\n    - `() => { done: true; value: any; } | { value: TElement; }`\r\n-\r\n    - `IterableIterator\u003cstring>`\r\n    - `{ next(): { done: true; value: any; } | { value: TElement; }; }`\r\n- \r\n    - `IteratorYieldResult\u003cstring>`\r\n    - `{ value: TElement; }`\r\n-\r\n    - `string`\r\n    - `TElement`\r\n\r\nand so `string` gets added as an inferred candidate for `TElement`.\r\n\r\nThere are a couple of remarkable things going on here.\r\n\r\n#### One remarkable thing\r\n\r\nUsing the the return type of the objects iterator for to infer the typeArgument for the object itself.\r\nBy coincide `String` and `JQuery` both have iterators, but the inference seems to be an extraordinary overreach.\r\n\r\n- Suggestion: *Resolve `string & \u003cSomeObject>` (`SomeObject` excepting `Enum`)  to `never` in `getReducedType`. In the rare cases where `String & \u003cSomeObject>` is actually intended to represent their common properties, `String` can be explicitly specified instead of `string`*.\r\n    - Test: Ran runtests to test this suggestion.\r\n    - Result:\r\n        - It does eliminate the bug noted in this post.  \r\n        - However there are 44 tests errors, many of which were cases of type abstractions such as \"tagged strings\" which have no relation to actual JS runtime types, and could be replaced with some other tagging method such as `WeakMap` or using a straightforward `interface TaggedString\u003cT> {string:string, tag:T}`.  Overloading the `&` symbol, which already has a specific meaning  in flow and inference, to represent other concepts is not a clean design, so TypeScript should not be obliged to support it.\r\n  \r\n#### Another remarkable thing, that does not directly cause the main topic bug \r\n\r\nThere are a lot assumptions in `inferFromSignatures`, and because of that these two inferences give difference results;\r\n- source: `string & JQuery\u003cHTMLElement>`, target:`JQuery\u003cTElement>`\r\n     - candidate for `TElement`: `HTMLElement` (repeat, ignored)\r\n- source: `JQuery\u003cHTMLElement> & string`, target:`JQuery\u003cTElement>`\r\n     - candidate for `TElement`: `string`\r\n\r\nThe result should not depend upon the order around the `&` symbol.  (However, changes to this \"remarkable thing\" would not prevent the bug which is the main topic of this post.) \r\n\r\n- Suggestion:  *If the source and target don't share the same symbol and thus share the same overloads, then in if a full NxM comparison of signatures can not be made, it might be better to do nothing than risk unpredictable behavior.  Instead, detect potential inferences from `tsserver`, and offer to fill in corresponding template constraints as an auto-completion.  What I mean is not the final type (which is obviously may be undetermined), but the location in terms of object member path.* \r\n\r\n\r\n","author":{"url":"https://github.com/craigphicks","@type":"Person","name":"craigphicks"},"datePublished":"2023-12-07T03:24:10Z","url":"https://github.com/microsoft/TypeScript/issues/56702"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bb141a7c-e7ce-4c85-f589-2f8d045c03ff
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCEA4:364B55:B0F279:E634D1:6B00E79F
html-safe-nonce75d312d188d947abdfd1322a557eaf7e008aff186dd08534eb7d34c4a27eaf10
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUE0OjM2NEI1NTpCMEYyNzk6RTYzNEQxOjZCMDBFNzlGIiwidmlzaXRvcl9pZCI6IjYyMzc3MTc4MjYyNTQyMDI3ODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac01eaed6511874d47bda37840f8ef4d0d44fb880d067a704457d98448976d7f88
hovercard-subject-tagissue:2029808183
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/56702/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7303eeb7d573c02f46cf6c5e0ce1709f0b52f1b742415d7185cd36ae8cd5fde8/microsoft/TypeScript/issues/56702
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7303eeb7d573c02f46cf6c5e0ce1709f0b52f1b742415d7185cd36ae8cd5fde8/microsoft/TypeScript/issues/56702
og:image:alt🔎 Search Terms type reduction fails generic function return type inference fails Couldn't find any issues that match this one sufficiently. 🕗 Version & Regression Information This is the behavior i...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecraigphicks
hostnamegithub.com
expected-hostnamegithub.com
None27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release624179fb8b88d26ba5bba08894eb60a1c5a1d93d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/56702#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F56702
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F56702
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/56702
Reloadhttps://github.com/microsoft/TypeScript/issues/56702
Reloadhttps://github.com/microsoft/TypeScript/issues/56702
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests308 (308)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/56702
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/56702
generic type parameters, for generic call expressions, not reduced to canonical form, causing type inference malfuction and errorshttps://github.com/microsoft/TypeScript/issues/56702#top
Needs More InfoThe issue still hasn't been fully clarifiedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%22
https://github.com/craigphicks
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#issue-2029808183
playgroundhttps://www.typescriptlang.org/play?ts=5.3.2#code/JYWwDg9gTgLgBAbzgEwKYDMCGBXANvTAZzgBI4BfOdKCEOAcgCsBHbVKAT3oG4AoUSLDgApAIptOVGnSat2XPrwDGEAHaF4MAIwAuOBqjBVAczgAfEePkAeABIAVALIAZAKK5UIVKpgA+c3DYqmjoRqjIcAC8pAAUAJTccAD0SXCqEHDsNFC8ymoacDAATHoxMQZGphZiEhx2Tm4eXj6+cXAAZHDlMIYmATU2Di7unt5+AUEhYchxbRaTGNNRsQnJqVnQvClwO3AAfntbqfYcYKgMA5zWFX0WQ42jLfRwwMTpBISEwMaqmABGHkKGRgp3O9DKNyqllq9WGTTGrQ6XUh-SsV3uI2a43mwUWqnCswmuNC+OQ9AAdEcdiczhc0XUUXcGpiEc9XmkIB8vj9-oCYMDQXSYRj4U9KdtdjSwYy4CLHjA2W9OXAiNzfgDzvzCoL6HKsRSqbtqTrIYqOVzvuq+QLabrmaKFeSYkUAMxFIpxXIqdSaLS6fQ9Sqo4X2+X+aIkeKJbbpTJQbJe-K+krIwO3aGDUNYxGdbq9KGXOp6hFEqaktoRqNrOMJiU7A5UqVCmwy4tPF5Ki08jVA7W2mWF2EPbMBPNBzqDtt+OZdSdZkudSFxA0Spv0Qet+ft9nvFWfS28zU2sFzuFhg15H0ZzgAfRR0Q3aeMvmj63jm22a9NKAgqE7+kwGBXnQDhCgAC3Ob0DEwIx4HoFkfApZ0XQAFhQz1PxNJ9nmQX9-0IQDgNAmAILgKCehgnwGCnJDXTQjDjiw-McLw80AKAwgQPAyCkygSi4IABVwSiAHk-kYVAlBgaxMFUDhfFo1D0N4IA
playgroundhttps://www.typescriptlang.org/play#code/JYWwDg9gTgLgBAbzgEwKYDMCGBXANvTAZzgBI4BfOdKCEOAcgCsBHbVKAT3oG4AoX4ADsY7LAGNUcAPoBJcLkS84yuIRiYRAYQjDUADxgAuVTChCA5nAA+cAFIBFNpz7k+vGBzCSACpiiY6AF4lFQAyOAAKEJUVG29gMQBrAB5ZeQAaOAAiNQ1UbV0DLIA+aLgASjLw31hgTFxk+KTUuTBcTMTUDgh0aVbcYuK3Dy84AGV1LR0RAzhAuBqAgG0cyfzp-RgsgF0+AHo9lQA9AH5lCLUzQUsbBycOZIAJABUAWQAZAFFcVBBUYWK5Tg4Qupgs1jsjnYDxeH2+v3+MGKEOwgjQ6CEqGQlV4Yh0ajgYGMiyCihiuSmhSMpAilQOygAfgzePTnp5JPQ7tDkpdwTZYV8fn8AfQ4MBiIIIARCIRgOZBJgAEY-OAsw4wCBwEYc0FXG6Q+5PN6ChEAoEg3nXCFczhGuFCxHImyo9GY7H0AB0EQATABmb3eyrkXhAA
#56013https://github.com/microsoft/TypeScript/issues/56013
#56373https://github.com/microsoft/TypeScript/pull/56373
#56373https://github.com/microsoft/TypeScript/pull/56373
#56013https://github.com/microsoft/TypeScript/issues/56013
similar errorshttps://github.com/microsoft/TypeScript/pull/56373#issuecomment-1828763860
#56013https://github.com/microsoft/TypeScript/issues/56013
playgroundhttps://www.typescriptlang.org/play#code/JYOwLgpgTgZghgYwgAgFIEUCu0CeAeAFQFEAbCAWwnGQF5kAJAgWQBlSKqwA+ZAbwChkQ5AGcA9pTAALUAHMAXMjggcAbkHCA9JuQBhKctkoABgG0AyjnIAjMSQB0wSFDhgxUALrHkb5MbHS0N7KACY+UijQUO7IsmIQIkoA7nA4GkIWVrYOTtCu7h6KABQAlLQ8AsJVyNp6BiBGfiAQAB5g3r7GMGJiwSBhgchRMXEJyanp1c1tpYqV1QsAbnAk2IrEZJTg6gtCAL6TVQA+fIe7IWLNimBQ2Du7VcurEIrKamf79-v8B-whEAgSHAoCgYJgQAgwMBLsgAFZYXCEdhbMC0BjMNibThcWZoBFQfAbDjgLjqfgIS4iVFgACMNMUVKgcmQJww2AJeEYrGR2LR8PZOFKqhqOhAYiGUGiUH45Mp1JpACZiozmaz8fguZjidwygAyZBFFUNFl4gWcjE8kkm8H-GCgCAhMp0fm4IUiiVS-i1YQAPx9Xp0BBwAAcUAByNmIo2yE2ay3cMPIYCJMWouAiETAWQgODWMg+cVgEPhw03VWmxFxrEkvUG6MmyMcqvangnG0QO3NR1h+wB4RB0PICPqvD1k7NlFcRPJ5CppQZrM5vMoXxFwfDs0T7E9sAiIoKgDMCoVJRlFJAVJ8cAZZeNfPVbtqw2l3oeDwA-AA9OEjrck3GNhqFrVtwsoXtS1iKIB5rciBPD3gKj6iuKz59m+6EYZ+74-puwEtgBv54ZOYGXmACA3kyxr6tBf7cEIzoPiUwpPpK7hoRhHGcUIWHui6TZEdiBG4bBLYkdSIRQYRImTsg+r1ghrpMe6qGvlxakft+tR8fg0Y4iUklmrpQA
Craig P Hicks (craigphicks)https://github.com/craigphicks
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#event-11176333285
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#event-11176548388
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#event-11176555798
https://github.com/fatcerberus
Bruce Pascoe (fatcerberus)https://github.com/fatcerberus
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#issuecomment-1845911349
https://github.com/craigphicks
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#issuecomment-1846156490
Bruce Pascoe (@fatcerberus)https://github.com/fatcerberus
#56013https://github.com/microsoft/TypeScript/issues/56013
#56373https://github.com/microsoft/TypeScript/pull/56373
#56013https://github.com/microsoft/TypeScript/issues/56013
#56373https://github.com/microsoft/TypeScript/pull/56373
you can see the list of errors herehttps://github.com/microsoft/TypeScript/pull/56373#issuecomment-1828763860
#56702https://github.com/microsoft/TypeScript/issues/56702
#56373https://github.com/microsoft/TypeScript/pull/56373
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#event-11187406285
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#event-11187409515
https://github.com/fatcerberus
Bruce Pascoe (fatcerberus)https://github.com/fatcerberus
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#issuecomment-1846185546
Craig P Hicks (@craigphicks)https://github.com/craigphicks
https://github.com/craigphicks
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 7, 2023https://github.com/microsoft/TypeScript/issues/56702#issuecomment-1846239631
Bruce Pascoe (@fatcerberus)https://github.com/fatcerberus
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs More InfoThe issue still hasn't been fully clarifiedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%22
on Dec 8, 2023https://github.com/microsoft/TypeScript/issues/56702#event-11198423411
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Dec 8, 2023https://github.com/microsoft/TypeScript/issues/56702#issuecomment-1847965811
https://github.com/craigphicks
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 10, 2023https://github.com/microsoft/TypeScript/issues/56702#issuecomment-1848850136
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/craigphicks
Craig P Hicks (craigphicks)https://github.com/craigphicks
on Dec 15, 2023https://github.com/microsoft/TypeScript/issues/56702#issuecomment-1857164364
Craig P Hicks (craigphicks)https://github.com/craigphicks
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 15, 2023https://github.com/microsoft/TypeScript/issues/56702#event-11254678709
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/56702
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/56702
Needs More InfoThe issue still hasn't been fully clarifiedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.