René's URL Explorer Experiment


Title: Boolean literal types and return type propagation for generators · Issue #2983 · microsoft/TypeScript · GitHub

Open Graph Title: Boolean literal types and return type propagation for generators · Issue #2983 · microsoft/TypeScript

X Title: Boolean literal types and return type propagation for generators · Issue #2983 · microsoft/TypeScript

Description: This suggestion has a few pieces: Implement boolean literal types for true and false, in a fashion similar to #1003 Implement type guards for booleans. Essentially, control flow constructs like if-else, while, for, etc would be subject t...

Open Graph Description: This suggestion has a few pieces: Implement boolean literal types for true and false, in a fashion similar to #1003 Implement type guards for booleans. Essentially, control flow constructs like if-...

X Description: This suggestion has a few pieces: Implement boolean literal types for true and false, in a fashion similar to #1003 Implement type guards for booleans. Essentially, control flow constructs like if-...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Boolean literal types and return type propagation for generators","articleBody":"This suggestion has a few pieces:\n1. Implement boolean literal types for `true` and `false`, in a fashion similar to #1003 \n2. Implement type guards for booleans. Essentially, control flow constructs like if-else, while, for, etc would be subject to a type guard if their guard expression is a boolean.\n3. Now we can update generators to have a `next` method that returns `{ done: false; value: TYield; } | { done: true; value: TReturn; }`, where TYield is inferred from the yield expressions of a generator, and TReturn is inferred from the return expressions of a generator.\n4. Iterators would return `{ done: false; value: TYield; } | { done: true; value: any; }` to be compatible with generators.\n5. for-of, spread, array destructuring, and the type yielded by `yield*` would only pick the value associated with done being false.\n6. The value of a `yield*` expression would pick the value associated with done being true.\n7. Introduce a Generator type that can be used to track the desired type of a `yield` expression. This would be TNext, and would be the type of the parameter for the next method on a generator.\n\nThe generator type would look something like this:\n\n``` ts\ninterface Generator\u003cTYield, TReturn, TNext> extends IterableIterator\u003cTYield> {\n    next(value?: TNext): IteratorYieldResult\u003cTYield> | IteratorReturnResult\u003cTReturn>;\n    throw(exception: any): IteratorYieldResult\u003cTYield> | IteratorReturnResult\u003cTReturn>;\n    return(value: any): IteratorYieldResult\u003cTYield> | IteratorReturnResult\u003cTReturn>;\n    [Symbol.iterator](): Generator\u003cTYield, TReturn, TNext>;\n    [Symbol.toStringTag]: string;\n}\n```\n","author":{"url":"https://github.com/JsonFreeman","@type":"Person","name":"JsonFreeman"},"datePublished":"2015-05-01T01:02:00Z","url":"https://github.com/microsoft/TypeScript/issues/2983"}

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:1312e2fe-b81c-b838-feef-1eddaed9d0f6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9732:22EC8D:4E5230:69D22B:6AFBF0B0
html-safe-noncec00b0aba17633420fe258e072d4047193f23dd3ec051ca4e0dfb31a17a0f3b2d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzMyOjIyRUM4RDo0RTUyMzA6NjlEMjJCOjZBRkJGMEIwIiwidmlzaXRvcl9pZCI6IjQ2MzIwNTMxODAzNDE2NzgyNTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3a933ba822f37f994d50fbdbcd266667d1b20b173748155d02296159241e1557
hovercard-subject-tagissue:72323438
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/2983/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dfaa27e38ccb702472880a2b4d6b2cfc6e56ca2677a0cb1c5daea6f5cf88cee0/microsoft/TypeScript/issues/2983
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dfaa27e38ccb702472880a2b4d6b2cfc6e56ca2677a0cb1c5daea6f5cf88cee0/microsoft/TypeScript/issues/2983
og:image:altThis suggestion has a few pieces: Implement boolean literal types for true and false, in a fashion similar to #1003 Implement type guards for booleans. Essentially, control flow constructs like if-...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJsonFreeman
hostnamegithub.com
expected-hostnamegithub.com
Nonefa74413a1d84dac536fcca0740780bcbd3207bafec0e51873b73ff8e8cca032f
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
releaseb3b5633a74535d9c23385512d534c66c8fde1907
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/2983#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F2983
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%2F2983
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/2983
Reloadhttps://github.com/microsoft/TypeScript/issues/2983
Reloadhttps://github.com/microsoft/TypeScript/issues/2983
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests335 (335)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/pulse
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2983
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2983
#9407https://github.com/microsoft/TypeScript/pull/9407
#30790https://github.com/microsoft/TypeScript/pull/30790
Boolean literal types and return type propagation for generatorshttps://github.com/microsoft/TypeScript/issues/2983#top
#9407https://github.com/microsoft/TypeScript/pull/9407
#30790https://github.com/microsoft/TypeScript/pull/30790
https://github.com/rbuckton
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
TypeScript 3.6.0https://github.com/microsoft/TypeScript/milestone/93
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on May 1, 2015https://github.com/microsoft/TypeScript/issues/2983#issue-72323438
Singleton types under the form of string literal types #1003https://github.com/microsoft/TypeScript/issues/1003
Nexthttps://github.com/microsoft/TypeScript/issues/2983?timeline_page=1
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
on May 1, 2015https://github.com/microsoft/TypeScript/issues/2983#event-294642155
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Jul 14, 2015https://github.com/microsoft/TypeScript/issues/2983#event-355795659
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Jun 29, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-229248349
#9407https://github.com/microsoft/TypeScript/pull/9407
https://github.com/s-panferov
Stanislav Panferov (s-panferov)https://github.com/s-panferov
on Jul 5, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-230404301
cohttps://github.com/tj/co
react-sagahttp://yelouafi.github.io/redux-saga/docs/basics/DeclarativeEffects.html
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Jul 5, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-230414026
Stanislav Panferov (@s-panferov)https://github.com/s-panferov
#2873https://github.com/microsoft/TypeScript/issues/2873
Proposal for generators design #2873https://github.com/microsoft/TypeScript/issues/2873
Number, enum, and boolean literal types #9407https://github.com/microsoft/TypeScript/pull/9407
Number, enum, and boolean literal types #9407https://github.com/microsoft/TypeScript/pull/9407
https://github.com/s-panferov
Stanislav Panferov (s-panferov)https://github.com/s-panferov
on Jul 5, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-230421492
Troy Gerwien (@yortus)https://github.com/yortus
#2873https://github.com/microsoft/TypeScript/issues/2873
#9407https://github.com/microsoft/TypeScript/pull/9407
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Jul 5, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-230424975
Stanislav Panferov (@s-panferov)https://github.com/s-panferov
#2873https://github.com/microsoft/TypeScript/issues/2873
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#9407https://github.com/microsoft/TypeScript/pull/9407
on Jul 28, 2016https://github.com/microsoft/TypeScript/issues/2983#event-738303842
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Aug 15, 2016https://github.com/microsoft/TypeScript/issues/2983#event-755366412
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Aug 15, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-239745655
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Aug 15, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-239747450
#2175https://github.com/microsoft/TypeScript/issues/2175
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Aug 15, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-239877835
https://github.com/falsandtru
falsandtru (falsandtru)https://github.com/falsandtru
on Sep 1, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-244050904
https://github.com/Igorbek
Igor Oleinikov (Igorbek)https://github.com/Igorbek
on Oct 5, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-251593170
Jason Freeman (@JsonFreeman)https://github.com/JsonFreeman
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Oct 5, 2016https://github.com/microsoft/TypeScript/issues/2983#issuecomment-251602440
Igor Oleinikov (@Igorbek)https://github.com/Igorbek
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
TypeScript 3.3https://github.com/microsoft/TypeScript/milestone/79
on Jan 2, 2019https://github.com/microsoft/TypeScript/issues/2983#event-2051153118
Ron Buckton (rbuckton)https://github.com/rbuckton
TypeScript 3.3https://github.com/microsoft/TypeScript/milestone/79
TypeScript 3.4.0https://github.com/microsoft/TypeScript/milestone/86
on Jan 22, 2019https://github.com/microsoft/TypeScript/issues/2983#event-2089721444
https://github.com/zpdDG4gta8XKpMCd
ZpdDG4gta (zpdDG4gta8XKpMCd)https://github.com/zpdDG4gta8XKpMCd
on Mar 7, 2019https://github.com/microsoft/TypeScript/issues/2983#issuecomment-470385364
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.4.0https://github.com/microsoft/TypeScript/milestone/86
TypeScript 3.5.0https://github.com/microsoft/TypeScript/milestone/89
on Mar 13, 2019https://github.com/microsoft/TypeScript/issues/2983#event-2201809977
Ron Buckton (rbuckton)https://github.com/rbuckton
TypeScript 3.5.0https://github.com/microsoft/TypeScript/milestone/89
TypeScript 3.6.0https://github.com/microsoft/TypeScript/milestone/93
on May 22, 2019https://github.com/microsoft/TypeScript/issues/2983#event-2360197356
https://github.com/brainkim
Brian Kim (brainkim)https://github.com/brainkim
on Jun 1, 2019https://github.com/microsoft/TypeScript/issues/2983#issuecomment-497972128
Ron Buckton (rbuckton)https://github.com/rbuckton
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#30790https://github.com/microsoft/TypeScript/pull/30790
on Jul 4, 2019https://github.com/microsoft/TypeScript/issues/2983#event-2459409617
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
on Jul 8, 2019https://github.com/microsoft/TypeScript/issues/2983#event-2467498305
https://github.com/oguimbal
Olivier Guimbal (oguimbal)https://github.com/oguimbal
on Jul 30, 2019https://github.com/microsoft/TypeScript/issues/2983#issuecomment-516307327
https://user-images.githubusercontent.com/8973947/62110620-1bfb8480-b2af-11e9-98a3-1f76a6c6c70b.png
https://github.com/ilbrando
ilbrandohttps://github.com/ilbrando
on Jan 15, 2020https://github.com/microsoft/TypeScript/issues/2983#issuecomment-574785570
Stanislav Panferov (@s-panferov)https://github.com/s-panferov
#2873https://github.com/microsoft/TypeScript/issues/2873
Proposal for generators design #2873https://github.com/microsoft/TypeScript/issues/2873
Number, enum, and boolean literal types #9407https://github.com/microsoft/TypeScript/pull/9407
Number, enum, and boolean literal types #9407https://github.com/microsoft/TypeScript/pull/9407
https://github.com/ilbrando/redux-saga-typescripthttps://github.com/ilbrando/redux-saga-typescript
https://github.com/danielnixon
Daniel Nixon (danielnixon)https://github.com/danielnixon
on Jan 15, 2020https://github.com/microsoft/TypeScript/issues/2983#issuecomment-574879323
ilbrandohttps://github.com/ilbrando
https://github.com/agiledigital/typed-redux-sagahttps://github.com/agiledigital/typed-redux-saga
https://github.com/ilbrando
ilbrandohttps://github.com/ilbrando
on Jan 16, 2020https://github.com/microsoft/TypeScript/issues/2983#issuecomment-575016059
Daniel Nixon (@danielnixon)https://github.com/danielnixon
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/2983
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2983
Ron Buckton (rbuckton)https://github.com/rbuckton
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
TypeScript 3.6.0https://github.com/microsoft/TypeScript/milestone/93
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.