René's URL Explorer Experiment


Title: Design Meeting Notes, 11/30/2022 · Issue #51811 · microsoft/TypeScript · GitHub

Open Graph Title: Design Meeting Notes, 11/30/2022 · Issue #51811 · microsoft/TypeScript

X Title: Design Meeting Notes, 11/30/2022 · Issue #51811 · microsoft/TypeScript

Description: --moduleResolution hybrid Very Node-like resolution mode that is mostly targeted at bundlers and special resolvers. What's it have that's special (beyond the weird classic mode)? node_modules package lookup Extensionless Not in --moduleR...

Open Graph Description: --moduleResolution hybrid Very Node-like resolution mode that is mostly targeted at bundlers and special resolvers. What's it have that's special (beyond the weird classic mode)? node_modules packa...

X Description: --moduleResolution hybrid Very Node-like resolution mode that is mostly targeted at bundlers and special resolvers. What's it have that's special (beyond the weird classic mode)? node_modul...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 11/30/2022","articleBody":"# `--moduleResolution hybrid`\r\n\r\n* Very Node-like resolution mode that is mostly targeted at bundlers and special resolvers.\r\n* What's it have that's special (beyond the weird `classic` mode)?\r\n    * `node_modules` package lookup\r\n    * Extensionless\r\n        * Not in `--moduleResolution node16`/`nodenext`\r\n    * Directory index lookup (i.e. look up an `index.*` file)\r\n        * Not in `--moduleResolution node16`/`nodenext`\r\n    * `exports` look-up from `package.json`\r\n        * Not in `--moduleResolution node`\r\n    * `*.ts` imports\r\n        * Nothing has this today!\r\n        * Only when using `--allowImportingTsExtensions`\r\n* `--allowImportingTsExtensions`\r\n    * Could potentially be ported to work on other resolution\r\n    * Requires `--noEmit`\r\n        * Why?\r\n            * When we emit, we will ***not*** rewrite the import paths. So\r\n            \r\n              ```ts\r\n              import * as foo from \"./foo.ts\"`\r\n              ```\r\n\r\n              will remain the same in the output `.js` file:\r\n\r\n              ```js\r\n              import * as foo from \"./foo.ts\"`\r\n              ```\r\n\r\n              and this will fail in most tools if `foo` was also rewritten to a JavaScript file named `foo.js`!\r\n        * Basically *some other tool* is going to either handle compilation of the files, or resolution of the files directly - so \r\n* We keep talking about what a bundler does (in the meeting) - why isn't this just called `--moduleResolution bundler`?\r\n    * Other loaders/runtimes like ts-node, bun, etc.\r\n    * Even if it's not perfect, `bundler` communicates more than `bundler`\r\n* What else is controversial other than the name?\r\n* More options than just `allowImportingTsExtensions`\r\n    * `allowImportingTsExtensions` (already mentioned)\r\n    * `resolvePackageJsonExports` - resolve from the `exports` field the way Node.js 12+ does today (which we do under the `node12`/`nodenext` flag)\r\n    * `resolvePackageJsonImports` - resolve from the `imports` field the way Node.js 16+ does today (which we do under the `node12`/`nodenext` flag)\r\n    * `customConditions` \r\n* Does `customConditions` need \r\n* We would prefer there were some sort of hierarchy to the flags, but not sure.\r\n* Do we need to ship all the flags?\r\n    * Browserify and Rollup don't do certain things by default.\r\n    * Rollup might be okay b\r\n* Prefer to ship as is, evaluate over the rest of the release cycle.\r\n\r\n\r\n# Deprecation Plan\r\n\r\n* `--ignoreDeprecations`\r\n    * Specify `\"5.0\"` to suppress all the errors that 5.x has deprecated.\r\n    * When 6.0 hits, using `\"ignoreDeprecations\": \"5.0\"` becomes an error.\r\n* `--noSwitchCaseFallthrough`\r\n    * We want to get out of the syntax linting business, but people likely use it.\r\n    * Not a huge cost anyway.\r\n    * Feels like we're keeping this.\r\n* `--out`?\r\n    * Totally broken?\r\n    * No it's not, only broken for `module`\r\n    * Only if we give a good error message.\r\n    * Deprecate.\r\n* `--charset`?\r\n    * Doesn't get respected anyway.\r\n    * Remove.\r\n* `--target es3`\r\n    * Deprecate.\r\n    * Complicates our testing infra now.\r\n* `\"prepend\": true` in project references?\r\n    * We did this for ourselves - but is this widely in use?\r\n    * We see one or two legit repos using it via GitHub's code search - the rest of the results seem to be duplicates of our repo.\r\n    * This complicates our emit quite a bit.\r\n    * okay.\r\n* Meta: we have *two-and-a-half years* to change our minds on this\r\n\r\n# Using our internal missing type\r\n\r\n#51653\r\n\r\n* Unfortunate that we have so many internal types and different flags!\r\n\r\n# `in` Operator Narrowing from Negative Checks\r\n\r\n#51339\r\n\r\n* If you have `obj: object` and write code like\r\n\r\n  ```ts\r\n  if (\"foo\" in obj && typeof obj.foo === \"string\") {\r\n    obj.foo;\r\n  }\r\n  ```\r\n\r\n  you would expect `obj.foo` to be valid and have the type `string`.\r\n* If you write the negative case and bail our early, you'd expect the same\r\n\r\n  ```ts\r\n  if (!(\"foo\" in obj) || typeof obj.foo !== \"string\") {\r\n    return;\r\n  }\r\n\r\n  obj.foo;\r\n  ```\r\n* This is the same problem as the fact that `obj` itself is narrowed in a distinct manner from `obj.foo`.\r\n    * `obj` is only narrowed to have type `{ \"foo\": unknown } & object` - not compatible with anything that requires `{ foo: string }`.\r\n    * However, `obj.foo` *is* narrowed to have the type `string`.\r\n    * Related issues are #18758, #32399.\r\n* It would really be ideal if `obj` was narrowed to `{ foo: string } & object`, and narrowing `obj.foo` would just \"fall out\" from narrowing `obj` itself.\r\n* Can imagine that we just stack intersections as we learn more\r\n    * e.g. `object & { foo: unknown } & { foo: string }` which simplifies to `object & { foo: string }`\r\n* The problem with doing that is you would end up with huge types in some cases - which adds visual noise and impacts performance.\r\n* Additionally, you can \"learn\" information by introducing intersections when narrowing types - but when you join from two branches, how do you know which intersections were \"learned\" from type guards vs. which intersections were already there.\r\n    * Feels doable, making this efficient also makes this harder.\r\n    * We eagerly normalize intersections which is part of what makes this challenging.\r\n* There's a silver lining - simplifying narrowing to just narrow the roots of references would make us more efficient in other ways.\r\n    * Also, deferring intersections could be faster.\r\n* Is this compelling?\r\n    * Lots of feedback on this issue.\r\n    * Spent a lot of time on this (e.g. #38839)\r\n    * There's also lots of UX weirdness in the language service as well (#51526)\r\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2022-12-08T01:57:51Z","url":"https://github.com/microsoft/TypeScript/issues/51811"}

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:323a13ce-8b6a-e29f-6da4-4bb010325227
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id88AE:15CF5E:D2364E:11F9F0E:6B05BEFD
html-safe-nonce762be3e4f3de6f3fca019fb4248c50d7d86d636e5c71aa7c43815f6759a913e9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEFFOjE1Q0Y1RTpEMjM2NEU6MTFGOUYwRTo2QjA1QkVGRCIsInZpc2l0b3JfaWQiOiI1NDE1MzQyNDg1MTI2MTAyNzgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf7edd4d64ae7b552f2b7cc0e6c9f5f124f2dce25d91881678191f1bc8f5b3683
hovercard-subject-tagissue:1483362920
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/51811/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5645831f634b91b9ee1a2dc7a3278eb37df7148986d6bd9a711e8c5e16508df2/microsoft/TypeScript/issues/51811
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5645831f634b91b9ee1a2dc7a3278eb37df7148986d6bd9a711e8c5e16508df2/microsoft/TypeScript/issues/51811
og:image:alt--moduleResolution hybrid Very Node-like resolution mode that is mostly targeted at bundlers and special resolvers. What's it have that's special (beyond the weird classic mode)? node_modules packa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDanielRosenwasser
hostnamegithub.com
expected-hostnamegithub.com
None708c2f10d746dbcf1dd80dc8309daa7d595df3fce8066244380fc3238618f09c
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
release2a29e3cf4fb57e81fd311774f91f345cc4436f40
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/51811#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F51811
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%2F51811
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/51811
Reloadhttps://github.com/microsoft/TypeScript/issues/51811
Reloadhttps://github.com/microsoft/TypeScript/issues/51811
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests322 (322)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/51811
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/51811
Design Meeting Notes, 11/30/2022https://github.com/microsoft/TypeScript/issues/51811#top
Design Noteshttps://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 Dec 8, 2022https://github.com/microsoft/TypeScript/issues/51811#issue-1483362920
#51653https://github.com/microsoft/TypeScript/pull/51653
#51339https://github.com/microsoft/TypeScript/issues/51339
Nested Tagged Unions #18758https://github.com/microsoft/TypeScript/issues/18758
Union not narrowed with typeof x.y as a discriminant #32399https://github.com/microsoft/TypeScript/issues/32399
Type guard by deep property #38839https://github.com/microsoft/TypeScript/pull/38839
Display narrowed type of properties in completionEntryDetails #51526https://github.com/microsoft/TypeScript/issues/51526
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Design Noteshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
on Dec 8, 2022https://github.com/microsoft/TypeScript/issues/51811#event-7983817683
https://github.com/Jack-Works
Jack Works (Jack-Works)https://github.com/Jack-Works
on Dec 10, 2022https://github.com/microsoft/TypeScript/issues/51811#issuecomment-1345152754
https://github.com/gberaudo
gberaudohttps://github.com/gberaudo
on Jul 21, 2023https://github.com/microsoft/TypeScript/issues/51811#issuecomment-1645342983
#49083 (comment)https://github.com/microsoft/TypeScript/issues/49083#issuecomment-1435399267
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 26, 2023https://github.com/microsoft/TypeScript/issues/51811#event-10782483195
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/51811
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/51811
Design Noteshttps://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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.