René's URL Explorer Experiment


Title: Design Meeting Notes, 3/8/2019 · Issue #30279 · microsoft/TypeScript · GitHub

Open Graph Title: Design Meeting Notes, 3/8/2019 · Issue #30279 · microsoft/TypeScript

X Title: Design Meeting Notes, 3/8/2019 · Issue #30279 · microsoft/TypeScript

Description: Higher order function type inference #30215 Reference code declare function pipe(ab: (...args: A) => B): (...args: A) => B; declare function invoke(f: (...args: A) => R, ...args: A): R; declare fun...

Open Graph Description: Higher order function type inference #30215 Reference code declare function pipe(ab: (...args: A) => B): (...args: A) => B; declare function invoke(f: (...ar...

X Description: Higher order function type inference #30215 Reference code declare function pipe<A extends any[], B>(ab: (...args: A) => B): (...args: A) => B; declare function invoke<A extends any[...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 3/8/2019","articleBody":"# Higher order function type inference\r\n\r\n#30215\r\n\r\nReference code\r\n\r\n```ts\r\ndeclare function pipe\u003cA extends any[], B>(ab: (...args: A) => B): (...args: A) => B;\r\ndeclare function invoke\u003cA extends any[], R>(f: (...args: A) => R, ...args: A): R;\r\n\r\ndeclare function box\u003cT>(x: T): { value; T };\r\ndeclare function list\u003cT>(x: T): T[];\r\ndeclare function map\u003cT, U>(f: (t: T) => U): (a: T[]) => U[];\r\n```\r\n\r\n* Seemed to get a lot of enthusiasm on this issue.\r\n* Builds on improvements to our inference - specifically, this does better when doing inference from other generic functions.\r\n    * First, we added a change to make types with generic signatures contextually sensitive.\r\n        * We have multiple rounds of inference, and marking arguments as contextually sensitive means we can defer inferring from them to later rounds.\r\n            * This allows us to let types flow *into* function expressions to understand their output types.\r\n        * This is important each pass of our inference process is fundamentally just a left-to-right process over provided arguments.\r\n        * This example used to give `{}[]` before this change. Now `list` is contextually sensitive and we infer `number` for `A`, and the output type is `number[]`.\r\n          ```ts\r\n          invoke(list, 42);\r\n          ```\r\n    * Another change is an extension of the last change - any invoked expression that has a generic call signature that can return a function is *also* contextually sensitive.\r\n\r\n      ```ts\r\n      // Would previously be `{}[]`, now is `number[]` because the `map` is generic and returns a function,\r\n      // and is now considered contextually sensitive.\r\n      invoke(map(x => x * 2), [1, 2, 3, 4]);\r\n\r\n      invoke(list, identity(42));\r\n      ```\r\n    * The last big change is that if the output type of a signature is a non-generic single signature type, then any type parameters which had no inferences will be \"promoted\" to fresh type variables on a version of the output type that is generic.\r\n        * Is this a problem for named type arguments?\r\n            * Any change to an invocation can change the way the type arguments are named in output types.\r\n        * In a sense, these fresh type variables get observed as existential types.\r\n    * Is there a way to opt *out* of this behavior?\r\n        * No.\r\n        * What if you specify a type parameter list on the output type?\r\n            * Yes.\r\n                * Can I specify an empty type parameter list?\r\n                    * No.\r\n                        * Huh.\r\n                            * Anders: I feel relatively confident in the change; observed differences seem to have been questionable anyway.\r\n    * Only user test suite code that saw changes is RxJS, fp-ts, and Ramda.\r\n        * RxJS: Looks like fixes. (@benlesh)\r\n        * fp-ts: Better errors, fixes. One .d.ts file changed by creating a generic output type(!) (@gcanti)\r\n        * Ramda: In some cases, better types. In a few, it's just people putting type parameters in the wrong place.\r\n    * Infra: we didn't need the stupid `excludeArguments` array in overload resolution.\r\n        * \"That constellation of weird hacks was just weird.\"\r\n* Limitations\r\n    * We haven't changed anything for unannotated function expressions\r\n\r\n      ```ts\r\n      declare function box\u003cT>(a: T): { value: T };\r\n      pipe(x => [x], box); // this is (x: any) => { value: any[] }\r\n      ```\r\n      \r\n      In other words, we don't try to infer type parameters for `x`.\r\n\r\n# Cross-compilation incremental builds\r\n\r\n#29813\r\n\r\n* High level idea: serializing the information we have in `--watch` mode to disk to get *way* faster subsequent compiles.\r\n* New flag called: `--incremental`\r\n    * Turned on by default for all composite projects, and defaults to a file called `.tsbuildinfo`.\r\n    * But can be turned on for ***all*** projects!\r\n* Works best for files with modules\r\n* `outFile` may need some changes because *something* will always need to cha\r\n* What's the `.tsbuildinfo` file look like?\r\n    * Here's the schema:\r\n\r\n      ```ts\r\n      export interface SourceFileInfo {\r\n          // List of helpers in own source files emitted if no prepend is present\r\n          helpers?: string[];\r\n          prologues?: SourceFilePrologueInfo[];\r\n      }\r\n\r\n      export interface BundleFileInfo {\r\n          sections: BundleFileSection[];\r\n          sources?: SourceFileInfo;\r\n      }\r\n\r\n      export interface BundleBuildInfo {\r\n          js?: BundleFileInfo;\r\n          dts?: BundleFileInfo;\r\n          commonSourceDirectory: string;\r\n          sourceFiles: ReadonlyArray\u003cstring>;\r\n      }\r\n\r\n      export interface ProgramBuildInfo {\r\n          fileInfos: MapLike\u003cBuilderState.FileInfo>;\r\n          options: CompilerOptions;\r\n          referencedMap?: MapLike\u003cstring[]>;\r\n          exportedModulesMap?: MapLike\u003cstring[]>;\r\n          semanticDiagnosticsPerFile?: string[];\r\n      }\r\n\r\n      export interface BuildInfo {\r\n          bundle?: BundleBuildInfo;\r\n          program?: ProgramBuildInfo;\r\n      }\r\n      ```\r\n* You can just delete this and everything should be fine, right?\r\n    * Yes.\r\n    * Though, there's an open question of whether deleting the file should trigger a full rebuild in either `--watch` or `--build`?\r\n        * Seems like yes.\r\n* Can MSBuild take advantage of this stuff?\r\n    * Talk about this offline.\r\n* `.tsbuildinfo.json` so tooling can understand it?\r\n    * Well, do we want people to be able to consume this file?\r\n        * No, but it's useful and people will.\r\n            * But we can't provide guarantees about this.\r\n        * What's the versioning story?\r\n            * Do these files need some sort of versioning?\r\n            * Maybe the the compiler can track this?\r\n                * The compiler needs to know what versions it's compatible with, so then why not a format version?\r\n            * Easier to just say that no version of TypeScript is compatible with `.tsbuildinfo` files from other compilations.\r\n                * Resolution: Version number in file.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2019-03-08T21:14:03Z","url":"https://github.com/microsoft/TypeScript/issues/30279"}

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:af668374-e650-a6d5-e136-d6113ad98486
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9954:3A73AA:1E05788:2607B01:6B019E1B
html-safe-nonced7e9a70b38f014dc83573648cb224c6cbd3942073d92955ee4373e3dffa26649
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTU0OjNBNzNBQToxRTA1Nzg4OjI2MDdCMDE6NkIwMTlFMUIiLCJ2aXNpdG9yX2lkIjoiODI0MDMxOTkwMDgwNDAyOTk3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac403275ad1dfbcacb65b0334ad5cdd3c892db0fc2ea9b42f519909024a286510c
hovercard-subject-tagissue:418959846
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/30279/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8d6e9f200b8f18c0876bb01daf5417964c357c76e58fb40d4bf8961338374c0a/microsoft/TypeScript/issues/30279
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8d6e9f200b8f18c0876bb01daf5417964c357c76e58fb40d4bf8961338374c0a/microsoft/TypeScript/issues/30279
og:image:altHigher order function type inference #30215 Reference code declare function pipe(ab: (...args: A) => B): (...args: A) => B; declare function invoke(f: (...ar...
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/30279#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F30279
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%2F30279
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/30279
Reloadhttps://github.com/microsoft/TypeScript/issues/30279
Reloadhttps://github.com/microsoft/TypeScript/issues/30279
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/30279
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/30279
Design Meeting Notes, 3/8/2019https://github.com/microsoft/TypeScript/issues/30279#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 Mar 8, 2019https://github.com/microsoft/TypeScript/issues/30279#issue-418959846
#30215https://github.com/microsoft/TypeScript/pull/30215
Ben Lesh (@benlesh)https://github.com/benlesh
Giulio Canti (@gcanti)https://github.com/gcanti
#29813https://github.com/microsoft/TypeScript/pull/29813
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 Mar 8, 2019https://github.com/microsoft/TypeScript/issues/30279#event-2191181249
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Mar 9, 2019https://github.com/microsoft/TypeScript/issues/30279#event-2191490771
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 13, 2019https://github.com/microsoft/TypeScript/issues/30279#event-2555008436
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/30279
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/30279
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.