René's URL Explorer Experiment


Title: Library include directives · Issue #7156 · microsoft/TypeScript · GitHub

Open Graph Title: Library include directives · Issue #7156 · microsoft/TypeScript

X Title: Library include directives · Issue #7156 · microsoft/TypeScript

Description: Problems /// comments (hereafter "reference directives") currently serve multiple purposes: Including another definition file containing global declarations Including another definition file containing ambient mo...

Open Graph Description: Problems /// comments (hereafter "reference directives") currently serve multiple purposes: Including another definition file containing global declarations Including anoth...

X Description: Problems /// <reference path="..." /> comments (hereafter "reference directives") currently serve multiple purposes: Including another definition file containing global de...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Library include directives","articleBody":"## Problems\n\n`/// \u003creference path=\"...\" />` comments (hereafter \"reference directives\") currently serve\nmultiple purposes:\n- Including another definition file containing global declarations\n- Including another definition file containing ambient module declarations\n- Including another implementation file\n\nThe current mechanism has some common shortcomings:\n- Relative paths to a common typings folder can be come unwieldy\n- There's no mechanism to \"override\" a reference path\n- Reference directives only ever look in one place to find a file.\n\nThis has resulted in multiple issue reports of people trying to address this:\n- #5893 Multiple source roots - or something like classpath, like python_path, like include_path\n- #4615 Support environment variables in reference paths\n- #6482 Support a 'declarationPath' option\n## New Use Case in Bundled Type Acquisition\n\nAn important scenario we need to address is the case where multiple typings\nfiles need to refer to the same _global_ set of types or namespaces. If these\nlibraries refer to multiple versions of the same global types, we have no\nexisting mechanism for resolving the conflict\n## Solution: Library include directive\n### Syntax\n\nThe proposed syntax (:bike: :house: of course) would look like this\n\n``` ts\n/// \u003creference library=\"jquery/jquery.d.ts\" />\n```\n### Behavior\n\nThis syntax means that the compiler should include the _first_ file found\nwhen searching the following paths, where relative paths are resolved relative\nto the project root (either the location of `tsconfig.json`, or the common\nroot of all input files):\n- `./typings/jquery/jquery.d.ts`\n- `./node_modules/jquery/jquery.d.ts`\n- `./node_modules/@types/jquery/jquery.d.ts`\n\nThis search order provides the following desirable behavior:\n- When needed, the user can resolve a version conflict by placing a definitive\n  global version in the local `typings` folder\n- A bundled `.d.ts` file will be found automatically\n- A `types` package can fill in for libraries which don't have bundled definitions\n\nWe could conceivably allow for configuration of this search order in `tsconfig.json` if\nneeded for complex scenarios.\n### UMD\n\nAdditionally, when a UMD module definition is found, its global export declaration (if present)\nis added to the global scope.\n## All-up World\n\nAlong with the rest of the typings acquisition story, we can now have a very coherent way to\nexplain how file references should be managed in TypeScript programs:\n- Modules which are part of your program are always imported using `import`\n- Modules which have definition files are always imported using `import`, and those `import`s should resolve to proper modules\n- Global definitions should always be located via `/// \u003creference library = ...` directives\n- File ordering for concatenated output is managed with `/// \u003creference path = ....` directives\n","author":{"url":"https://github.com/RyanCavanaugh","@type":"Person","name":"RyanCavanaugh"},"datePublished":"2016-02-19T17:25:31Z","url":"https://github.com/microsoft/TypeScript/issues/7156"}

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:fc6d78a5-cce2-6aa9-49e8-e02effe2fb8b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD490:26ECEB:20C5273:29A6DC7:6B015D05
html-safe-nonce91ef7c98790545a578cfb0b89fe10bcc650d295c9bba85fca7727315091bf35d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDkwOjI2RUNFQjoyMEM1MjczOjI5QTZEQzc6NkIwMTVEMDUiLCJ2aXNpdG9yX2lkIjoiNjc0NDk2MDk1ODYyOTc2NDM1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac63ba48c6943b10a5db096c6c103bab5ca87c919691348d840080d0e7e59907bb
hovercard-subject-tagissue:134923063
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/7156/issue_layout
twitter:imagehttps://opengraph.githubassets.com/386efeb21da715e7020ccbf4df4e027ee7f09b01cf3f002eb1a67d0f92d86965/microsoft/TypeScript/issues/7156
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/386efeb21da715e7020ccbf4df4e027ee7f09b01cf3f002eb1a67d0f92d86965/microsoft/TypeScript/issues/7156
og:image:altProblems /// comments (hereafter "reference directives") currently serve multiple purposes: Including another definition file containing global declarations Including anoth...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRyanCavanaugh
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/7156#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F7156
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%2F7156
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/7156
Reloadhttps://github.com/microsoft/TypeScript/issues/7156
Reloadhttps://github.com/microsoft/TypeScript/issues/7156
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/7156
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7156
Library include directiveshttps://github.com/microsoft/TypeScript/issues/7156#top
https://github.com/RyanCavanaugh
@typesRelates to working with .d.ts files (declaration/definition files) from DefinitelyTypedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22%40types%22
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 2.0https://github.com/microsoft/TypeScript/milestone/1
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Feb 19, 2016https://github.com/microsoft/TypeScript/issues/7156#issue-134923063
Multiple source roots - or something like classpath, like python_path, like include_path !!! #5893https://github.com/microsoft/TypeScript/issues/5893
///references should support resolving environment variables #4615https://github.com/microsoft/TypeScript/issues/4615
Support a 'declarationPath' option #6482https://github.com/microsoft/TypeScript/issues/6482
Nexthttps://github.com/microsoft/TypeScript/issues/7156?timeline_page=1
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Feb 19, 2016https://github.com/microsoft/TypeScript/issues/7156#event-556847622
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
@typesRelates to working with .d.ts files (declaration/definition files) from DefinitelyTypedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22%40types%22
on Feb 20, 2016https://github.com/microsoft/TypeScript/issues/7156#event-557788319
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Feb 20, 2016https://github.com/microsoft/TypeScript/issues/7156#event-557788328
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 2, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-191371016
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Typings (@typings)https://github.com/typings
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 3, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-192026672
https://github.com/billti
Bill Ticehurst (billti)https://github.com/billti
on Mar 4, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-192525850
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Mar 16, 2016https://github.com/microsoft/TypeScript/issues/7156#event-592424108
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 16, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-197530240
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 2.0https://github.com/microsoft/TypeScript/milestone/1
on Mar 16, 2016https://github.com/microsoft/TypeScript/issues/7156#event-592450624
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-207921946
#7775https://github.com/microsoft/TypeScript/pull/7775
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7156#event-621368137
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7156#event-621368160
https://github.com/unional
Homa Wong (unional)https://github.com/unional
on Apr 13, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209681143
#7125 (comment)https://github.com/microsoft/TypeScript/issues/7125#issuecomment-209670094
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
Blake Embrey (@blakeembrey)https://github.com/blakeembrey
Basarat Ali Syed (@basarat)https://github.com/basarat
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 13, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209686997
https://github.com/unional
Homa Wong (unional)https://github.com/unional
on Apr 13, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209689064
Blake Embrey (@blakeembrey)https://github.com/blakeembrey
https://github.com/unional
Homa Wong (unional)https://github.com/unional
on Apr 13, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209689826
https://github.com/unional
Homa Wong (unional)https://github.com/unional
on Apr 13, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209691918
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 14, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209700454
https://github.com/unional
Homa Wong (unional)https://github.com/unional
on Apr 14, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209775352
#7755https://github.com/microsoft/TypeScript/issues/7755
https://github.com/unional
Homa Wong (unional)https://github.com/unional
on Apr 14, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209775730
https://github.com/unional
Homa Wong (unional)https://github.com/unional
on Apr 14, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-209778414
typings/core#1https://github.com/typings/core/issues/1
Blake Embrey (@blakeembrey)https://github.com/blakeembrey
typings/core#1 (comment)https://github.com/typings/core/issues/1#issuecomment-192802609
https://github.com/blakeembrey
Blake Embrey (blakeembrey)https://github.com/blakeembrey
on Apr 14, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-210043840
https://github.com/born2net
AngularNinja.com (born2net)https://github.com/born2net
on Jun 16, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-226503540
https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/
https://github.com/jonaskello
Jonas Kello (jonaskello)https://github.com/jonaskello
on Sep 25, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-249413441
https://github.com/jonaskello
Jonas Kello (jonaskello)https://github.com/jonaskello
on Sep 25, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-249415939
https://github.com/jonaskello
Jonas Kello (jonaskello)https://github.com/jonaskello
on Sep 25, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-249419143
https://github.com/jonaskello
Jonas Kello (jonaskello)https://github.com/jonaskello
on Sep 25, 2016https://github.com/microsoft/TypeScript/issues/7156#issuecomment-249419547
microsofthttps://github.com/microsoft
on Jun 19, 2018https://github.com/microsoft/TypeScript/issues/7156#event-1689639719
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/7156
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7156
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
@typesRelates to working with .d.ts files (declaration/definition files) from DefinitelyTypedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22%40types%22
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 2.0https://github.com/microsoft/TypeScript/milestone/1
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.