Title: es-get-iterator broken by IIFE now allowing contextual return type · Issue #45559 · microsoft/TypeScript · GitHub
Open Graph Title: es-get-iterator broken by IIFE now allowing contextual return type · Issue #45559 · microsoft/TypeScript
X Title: es-get-iterator broken by IIFE now allowing contextual return type · Issue #45559 · microsoft/TypeScript
Description: Broken by #45007: interface Iterable Open Graph Description: Broken by #45007: interface Iterable X Description: Broken by #45007: interface Iterable<T, TReturn = unknown, TNext = undefined> { [Symbol.iterator](): Iterator<T, TReturn, TNext>; } type InferIterable<T> = T extends Iterable<i...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/45559
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"es-get-iterator broken by IIFE now allowing contextual return type ","articleBody":"Broken by #45007:\r\n\r\n```ts\r\ninterface Iterable\u003cT, TReturn = unknown, TNext = undefined> {\r\n [Symbol.iterator](): Iterator\u003cT, TReturn, TNext>;\r\n}\r\n\r\ntype InferIterable\u003cT> = T extends Iterable\u003cinfer TYield, infer TReturn, infer TNext>\r\n ? Iterator\u003cTYield, TReturn, TNext>\r\n : unknown extends T\r\n ? Iterator\u003cunknown> | undefined\r\n : undefined;\r\n\r\ndeclare function getIterator\u003cT>(iterable: T): InferIterable\u003cT>;\r\n\r\nvar x = getIterator((function*() { yield \"foo\"; yield \"bar\"; })());\r\n```\r\n\r\nExpected: `x: Iterator\u003c\"foo\" | \"bar\", void, unknown>`\r\n\r\nActual: `x: Iterator\u003c\"foo\" | \"bar\", void, any>`\r\n\r\nI think this is an acceptable break, but I want another round of thinking about it now that we have a concrete example.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2021-08-24T00:36:11Z","url":"https://github.com/microsoft/TypeScript/issues/45559"}
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:1932ee1b-8d50-ac64-015a-43f6cb652325 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id A342:31D532:CB4216:10DC717:6B01CAAE html-safe-nonce 4a1bf06fba35dc99a91652ec3c980d50725ac1047efa74c93a3e1683bea7aeca visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzQyOjMxRDUzMjpDQjQyMTY6MTBEQzcxNzo2QjAxQ0FBRSIsInZpc2l0b3JfaWQiOiI3MTAxNDk4MzY1ODA4MDY5Mjk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= visitor-hmac 9008e5e67e4e35e813654c3c69183fbbca232f035960a476cf32203af14d360a hovercard-subject-tag issue:977590435 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/45559/issue_layout twitter:image https://opengraph.githubassets.com/d989aaa1fe7330edc6c63ba26132631b29962914d9bc7310b3ec61d2b6ae9816/microsoft/TypeScript/issues/45559 twitter:card summary_large_image og:image https://opengraph.githubassets.com/d989aaa1fe7330edc6c63ba26132631b29962914d9bc7310b3ec61d2b6ae9816/microsoft/TypeScript/issues/45559 og:image:alt Broken by #45007: interface Iterable 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 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.