René's URL Explorer Experiment


Title: Design Meeting Notes, 4/30/2024 · Issue #58417 · microsoft/TypeScript · GitHub

Open Graph Title: Design Meeting Notes, 4/30/2024 · Issue #58417 · microsoft/TypeScript

X Title: Design Meeting Notes, 4/30/2024 · Issue #58417 · microsoft/TypeScript

Description: TReturn and TYield for Iterators and Other Types #58243 TReturn is the type of values returned by a generator. TYield is the type of values yielded by a generator. When we added these, we only added them to certain types like IteratorRes...

Open Graph Description: TReturn and TYield for Iterators and Other Types #58243 TReturn is the type of values returned by a generator. TYield is the type of values yielded by a generator. When we added these, we only adde...

X Description: TReturn and TYield for Iterators and Other Types #58243 TReturn is the type of values returned by a generator. TYield is the type of values yielded by a generator. When we added these, we only adde...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 4/30/2024","articleBody":"\r\n# `TReturn` and `TYield` for Iterators and Other Types\r\n\r\n#58243\r\n\r\n* `TReturn` is the type of values *returned* by a generator.\r\n* `TYield` is the type of values *yielded* by a generator.\r\n* When we added these, we only added them to certain types like `IteratorResult`\r\n    * Since then, we have a PR that adds type parameters to `Iterator`, `IterableIterator`, `AsyncIterable`, etc.\r\n    * What this has meant since then was that if you ever try to grab `value` off of most `IteratorResult`s, then you'll get `any`.\r\n        * Good as a fall-back, but usually not what people want.\r\n* Changing this is a breaking change - so how can we avoid breaks?\r\n    * First, each of these types should have a default value for `TReturn` and `TYield` that is `any`.\r\n        * But when a user writes `Iterator\u003cnumber\u003e`, TypeScript should preserve that type as-is.\r\n    * What is the level of breakage as is?\r\n        * Almost every case is an example of the type system not knowing that `size \u003e 0` implies `value` is not `undefined`.\r\n        * There's also a lot of breakage around DefinitelyTyped's `ExpectType` and `ExpectError` utility types.\r\n* Several new errors introduced. Previously, people expecting `.next()` to return a `T` now get `T | void`.\r\n    * e.g. `if (something.size === 1) { something.values().nexT().value.getTasks(); }`\r\n    * Why is it `void` and not `undefined`?\r\n        * Should it be `undefined`?\r\n        * We really don't want to relitigate all the issues around non-returning functions returning `void` instead of `undefined`.\r\n        * It's possible we carve things out for generators.\r\n    * Should we allow postfix `!` to get rid of `void`?\r\n* How many upvotes does resolution for this issue have?\r\n    * Old issue had around 15 upvotes.\r\n    * This is so breaky that most of this has to go under a switch.\r\n* What happens if we don't do this?\r\n    * People trying to thread these into the built-in iterator types.\r\n    * If you have a generator, you can now write `myGenerator().map(x =\u003e x * x)` and you want the `TReturn` preserved.\r\n* If the worst thing you have to do is add a `!`, is that so bad?\r\n* Feel like there should be an approach where this is flagged.\r\n    * Could be like `strictBindCallApply`.\r\n    * We fret about breaks for much more widely-requested features.\r\n    * But the people it breaks are using iterators, probably want to use the feature.\r\n    * The flag that this conceptually aligns with is `noUncheckedIndexedAccess`.\r\n        * Ah yes, `.next()`, the famous indexed access syntax.\r\n        * Okay, fine, a separate flag with an equally bad name (`noUncheckedIteratorAccess` or `noUncheckedIteratorResult`).\r\n\r\n# `tsc --init` Updates?\r\n\r\n* We noticed `tsc --init` adds `\"module\": \"commonjs\"` - which our docs said to never ever ever do.\r\n* Okay, what else do we need to fix in `--init`?\r\n* [Ryan asked on Twitter what people would like to change](https://twitter.com/SeaRyanC/status/1782783901213282557).\r\n* People said lots of stuff\r\n    * Big one that resonates: remove the wall of text comments\r\n* Are we okay wiht `tsc --init` generating a file today?\r\n    * Uh yes.\r\n* Okay, that's a good start.\r\n* What else?\r\n    * Make it minimal\r\n    * People seem opposed to interactive.\r\n* Okay, what are things that need to be hashed through?\r\n    * `target: esnext`?\r\n    * `module` - `node16` or `bundler`?\r\n    * `verbatimModuleSyntax`?\r\n    * `skipLibCheck`?\r\n    * We need to hash through these.\r\n* Should we still have *some* comments on defaults?\r\n    * Maybe.\r\n    * [Ryan also wrote a wizard](https://ryancavanaugh.github.io/tsc-init/), someone else wrote something too.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2024-05-02T22:14:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/58417/TypeScript/issues/58417"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b13b1487-b4b5-891b-008d-b3dcb0d404f6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBC9A:18D9A8:2E6FBE5:42068C4:6A4CFFC5
html-safe-noncedba3de51d2d19fdf6a473d6d7ed8432454c0c9eb772e13f74734c92d08d90a4f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzlBOjE4RDlBODoyRTZGQkU1OjQyMDY4QzQ6NkE0Q0ZGQzUiLCJ2aXNpdG9yX2lkIjoiNTI5NzUwNjYxMTY1NTQ3NDYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb0f0732ed6e0abf0f553e07f1cd8f889469854cc3ab577049344112821118efd
hovercard-subject-tagissue:2276592854
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/58417/issue_layout
twitter:imagehttps://opengraph.githubassets.com/74eca7b1f4a0483ae7dfee9fef6603cf8adaf03fdf9ed6c4ba1e04523a773bcd/microsoft/TypeScript/issues/58417
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/74eca7b1f4a0483ae7dfee9fef6603cf8adaf03fdf9ed6c4ba1e04523a773bcd/microsoft/TypeScript/issues/58417
og:image:altTReturn and TYield for Iterators and Other Types #58243 TReturn is the type of values returned by a generator. TYield is the type of values yielded by a generator. When we added these, we only adde...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDanielRosenwasser
hostnamegithub.com
expected-hostnamegithub.com
None31e4db13a9e20081f2fac78f441659a6576e582bbb15e153f9c7fb6473aa29f5
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
releasefb70bd3c4b2bec429781b65419e912c66e2d5581
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/58417#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F58417
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F58417
Sign up https://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/58417
Reloadhttps://github.com/microsoft/TypeScript/issues/58417
Reloadhttps://github.com/microsoft/TypeScript/issues/58417
Please reload this pagehttps://github.com/microsoft/TypeScript/issues/58417
microsoft https://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Fork 13.5k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Star 109k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Code https://github.com/microsoft/TypeScript
Issues 5k+ https://github.com/microsoft/TypeScript/issues
Pull requests 33 https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality 0 https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Code https://github.com/microsoft/TypeScript
Issues https://github.com/microsoft/TypeScript/issues
Pull requests https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Design Meeting Notes, 4/30/2024https://github.com/microsoft/TypeScript/issues/58417#top
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
https://github.com/DanielRosenwasser
DanielRosenwasserhttps://github.com/DanielRosenwasser
on May 2, 2024https://github.com/microsoft/TypeScript/issues/58417#issue-2276592854
#58243https://github.com/microsoft/TypeScript/pull/58243
Ryan asked on Twitter what people would like to changehttps://twitter.com/SeaRyanC/status/1782783901213282557
Ryan also wrote a wizardhttps://ryancavanaugh.github.io/tsc-init/
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%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.