René's URL Explorer Experiment


Title: Design Meeting Notes, 7/12/2024 · Issue #59362 · microsoft/TypeScript · GitHub

Open Graph Title: Design Meeting Notes, 7/12/2024 · Issue #59362 · microsoft/TypeScript

X Title: Design Meeting Notes, 7/12/2024 · Issue #59362 · microsoft/TypeScript

Description: Making Type Error Elaboration More Consistent #58859 Problem: you may get a different error elaboration in different locations depending on the order in which a program is checked. There are various reasons for this, with the class of di...

Open Graph Description: Making Type Error Elaboration More Consistent #58859 Problem: you may get a different error elaboration in different locations depending on the order in which a program is checked. There are variou...

X Description: Making Type Error Elaboration More Consistent #58859 Problem: you may get a different error elaboration in different locations depending on the order in which a program is checked. There are variou...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 7/12/2024","articleBody":"# Making Type Error Elaboration More Consistent\n\nhttps://github.com/microsoft/TypeScript/pull/58859\n\n* Problem: you may get a different error elaboration in different locations depending on the order in which a program is checked.\n    * There are various reasons for this,  with the class of differences we're concerned about here, but we try to avoid reporting the full context if you've already seen it.\n* The main reason we're focusing on this is region-based diagnostics. If you first check statements in the middle of the file, it is weird to get a different level of error detail than top-down checking.\n* In this PR, every time we report a type error, we will now provide the full elaboration.\n\n# Deferred Parameters and Control Flow Analysis for Function Expression Arguments\n\nhttps://github.com/microsoft/TypeScript/pull/58729\n\n* Feel it is a valuable fix for a long-standing problem.\n* Core idea is to assume that callback function expressions are possibly called, and to factor that into the control flow analysis of variables used afterwards.\n* Means that in cases like\n\n  ```ts\n  let x: number | undefined;\n  x = 42;\n  someArray.forEach(() => { x = undefined; });\n  x++; // Should be an error. Was not previously, is an error with this PR.\n  ```\n\n  now correctly fail to type-check.\n* To opt out, the idea is to introduce a `deferred` modifier; but there's a compatibility problem with all the tools in the ecosystem understanding that. Declaration files will need to introduce it and split between `typesVersions`, existing code may need an annotation even in `.ts` files.\n    * PR also has support for `/** @deferred */` JSDoc comment that is understood in `.ts` files - not just `.js` files.\n* Also a question of a new parameter modifier being possibly in conflict with JavaScript.\n    * We don't see one, but it might be worth reaching out to the committee to better understand concerns.\n* What's the relationship between a `deferred` callback and `await`?\n    * It doesn't really factor in; we don't analyze deferred callbacks other than at the use-site.\n* How does declaration emit work for the JSDoc tag?\n    * What you write is what you get.\n* What happens when a library is not upgraded to use `deferred`?\n    * You can just use a type assertion to the expected type to opt out.\n    * Alternatively, and maybe more preferred, is to write a function that takes a deferred callback and returns it.\n\n      ```ts\n      function deferred\u003cF extends (...args: never[]) => unknown>(deferred callback: F): F {\n          return callback;\n      }\n      ```\n* We want to make sure that we're not missing anything. Will do the work to get Node.js and lib.d.ts/DOM libraries to have `deferred`.\n\n#  \n\n```ts\ntype DataOrNull\u003cT> = {\n    data: T | null;\n};\n\ndeclare function check(s: DataOrNull\u003cstring>): void;\n\ndeclare let foo: DataOrNull\u003cstring | null>;\ncheck(foo); // Error?\n```\n\n* We \"smartly\" infer that `T` is covariant (please disregard the soundness aspect here).\n    * When we ask if `DataOrNull\u003cstring | null>` is assignable to `DataOrNull\u003cstring>`, we try to just ask \"is `string | null` assignable to `string`?\" and answer \"no\".\n* One idea: give people a new opt-out for variance calculation?\n\n  ```ts\n  type DataOrNull\u003cunmeasurable T> = {\n      data: T | null;\n  };\n  ```\n\n* \"Unmeasurable\" is the concept we use internally to say \"this type parameter must always be checked with respect to the structure of the containing type\".\n* What do we name this?\n\n  ```ts\n  type DataOrNull\u003csus T> = {\n      data: T | null;\n  };\n  ```\n* `structural`?\n* `linear`?\n* `inconsistent`?\n* `nonvariant`\n* Could we infer this better?\n    * The pattern is common, and if we don't infer some variance in these scenarios, things are likely to get quite a bit slower.\n* Isn't a similar problem going to come up with libraries prioritizing correctness?\n    * Unmeasurable variance is pretty infectious with type parameters. A type reference that takes a type variable for an unreliable type parameter makes the type variable also unreliable with respect to its containing type.\n* Could view this as \"unreliable\" - another internal view of type parameters, where they might have a variance, but uses the structural fallback.\n* What about this on the use-site?\n\n  ```ts\n  declare let foo: DataOrNull\u003cstructural string>;\n  ```\n    * Hard to think about what that means/explain to developers.\n* There are hacks to induce unreliable variance. @RyanCavanaugh will post this.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2024-07-19T19:08:34Z","url":"https://github.com/microsoft/TypeScript/issues/59362"}

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:75c2c448-2bfc-b406-e817-8692ce340102
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE6C4:1F68:417E0A:5C58C2:6B01BCB7
html-safe-nonceb423c058e7bbb78dc4b0f176489023d4c380a7059e54c0e5e0ef21e38eb87c02
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkM0OjFGNjg6NDE3RTBBOjVDNThDMjo2QjAxQkNCNyIsInZpc2l0b3JfaWQiOiI2NzYwNjkxODQ2NTU5NjUzNjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac81cf3d88b086dc1335868093176a530165dcd04fb2305fa509876ff067efd046
hovercard-subject-tagissue:2419662346
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/59362/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b6f89283bbc55c8bbbcf641f7e8a0b2474b0c47e7f00c7bf0cb23b37a479ee37/microsoft/TypeScript/issues/59362
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b6f89283bbc55c8bbbcf641f7e8a0b2474b0c47e7f00c7bf0cb23b37a479ee37/microsoft/TypeScript/issues/59362
og:image:altMaking Type Error Elaboration More Consistent #58859 Problem: you may get a different error elaboration in different locations depending on the order in which a program is checked. There are variou...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDanielRosenwasser
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/59362#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F59362
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%2F59362
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/59362
Reloadhttps://github.com/microsoft/TypeScript/issues/59362
Reloadhttps://github.com/microsoft/TypeScript/issues/59362
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)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/59362
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/59362
Design Meeting Notes, 7/12/2024https://github.com/microsoft/TypeScript/issues/59362#top
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Jul 19, 2024https://github.com/microsoft/TypeScript/issues/59362#issue-2419662346
#58859https://github.com/microsoft/TypeScript/pull/58859
#58729https://github.com/microsoft/TypeScript/pull/58729
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
on Jul 19, 2024https://github.com/microsoft/TypeScript/issues/59362#event-13580170490
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Jul 19, 2024https://github.com/microsoft/TypeScript/issues/59362#issuecomment-2240404518
#59049https://github.com/microsoft/TypeScript/issues/59049
#9998https://github.com/microsoft/TypeScript/issues/9998
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 5, 2025https://github.com/microsoft/TypeScript/issues/59362#event-20738229399
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/59362
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/59362
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.