René's URL Explorer Experiment


Title: What do we call this command-line option? · Issue #2715 · microsoft/TypeScript · GitHub

Open Graph Title: What do we call this command-line option? · Issue #2715 · microsoft/TypeScript

X Title: What do we call this command-line option? · Issue #2715 · microsoft/TypeScript

Description: Consider two TypeScript files: _a.ts_ module M { export var t = 5; } _b.ts_ var t = 'foo'; module M { var s = t; // <-- what does this mean? } If we compile b.ts on its own, the t in var s = t refers to the outer var t, a string. The emi...

Open Graph Description: Consider two TypeScript files: _a.ts_ module M { export var t = 5; } _b.ts_ var t = 'foo'; module M { var s = t; // <-- what does this mean? } If we compile b.ts on its own, the t in var s = t refe...

X Description: Consider two TypeScript files: _a.ts_ module M { export var t = 5; } _b.ts_ var t = 'foo'; module M { var s = t; // <-- what does this mean? } If we compile b.ts on its own, the t in var...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"What do we call this command-line option?","articleBody":"Consider two TypeScript files:\n**_a.ts**_\n\n``` ts\nmodule M {\n  export var t = 5;\n}\n```\n\n**_b.ts**_\n\n``` ts\nvar t = 'foo';\nmodule M {\n  var s = t; // \u003c-- what does this mean?\n}\n```\n\nIf we compile b.ts on its own, the `t` in `var s = t` refers to the outer var `t`, a `string`. The emit for this line is simply `var s = t;`.\n\nIf we compile b.ts _along with a.ts_, the `t` in `var s = t` refers to `M.t`, the exported variable of type `number`. The emit for this line is `var s = M.t`.\n\nThis behavior, and a few other language features (e.g. `const enum`), prevent TypeScript from being able to correctly operate on a single file without understanding the entire universe of files involved in the program. This has performance implications for features like compile-on-save, especially in larger projects, and blocks scenarios like on-the-fly compilation in module loaders.\n\nWe'd really prefer to be able to _emit_ a file without first understanding the entire program it's a part of. The language as-is prevents this. However, by slightly subsetting the language to disallow things that require whole-program binding/typechecking, we can re-enable those scenarios. People can \"opt in\" their project to this language subset as a trade-off.\n\nTentatively, we're calling the prongs of this fork \"whole program mode\" and \"single file mode\". Naming TBD.\n\nA key part of this is that you need to be able to compile e.g. a.ts and b.ts above in a mode that says \"This code will not work in single-file-mode\", e.g.:\n\n```\n > tsc --warnMeIfThisIsNotSafeInSingleFileMode a.ts b.ts\nTS1234 (b.ts line 2): Modules may not be re-opened in single-file mode\n```\n\nWe need some help naming these things, especially the commandline flag. The current list of ideas on the whiteboard, of which nobody likes anything, consists of the following :frowning:\n- `separateCompile`\n- `singleFileEmit`\n- `disableGlobalOptimizations`\n- `safeForTranspile`\n- `safeForSyntacticTranspilation`\n- `separate`\n- `isolated`\n- `safeTransform`\n- `singleFileScope`\n- `crossFileSafe`\n- `crossFileRestrictions`\n\nPlease help :bike: :house:!\n\nRef #2499\n","author":{"url":"https://github.com/RyanCavanaugh","@type":"Person","name":"RyanCavanaugh"},"datePublished":"2015-04-10T19:33:01Z","url":"https://github.com/microsoft/TypeScript/issues/2715"}

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:faf24058-ddd3-03d3-ecc2-a9f526738d41
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBF88:4E3C:BCBC88:FB72E8:6B00F22A
html-safe-nonce448e4fa6e47d4738d6d314d2004f4110695f8867db2807b070eaefe72b151650
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjg4OjRFM0M6QkNCQzg4OkZCNzJFODo2QjAwRjIyQSIsInZpc2l0b3JfaWQiOiI3MDI0ODM2MjE4OTM2NDIyOTU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaccc7c56cb77de9c1f4d0ce850bde9f0897472edcf661de71639104ce189d9feb4
hovercard-subject-tagissue:67665721
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/2715/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6cb4d23f5b2baa336db68f41aa649853842d4fa868e36fa47690f6dd2854d17d/microsoft/TypeScript/issues/2715
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6cb4d23f5b2baa336db68f41aa649853842d4fa868e36fa47690f6dd2854d17d/microsoft/TypeScript/issues/2715
og:image:altConsider two TypeScript files: _a.ts_ module M { export var t = 5; } _b.ts_ var t = 'foo'; module M { var s = t; // <-- what does this mean? } If we compile b.ts on its own, the t in var s = t refe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRyanCavanaugh
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/2715#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F2715
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%2F2715
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/2715
Reloadhttps://github.com/microsoft/TypeScript/issues/2715
Reloadhttps://github.com/microsoft/TypeScript/issues/2715
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests308 (308)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/2715
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2715
What do we call this command-line option?https://github.com/microsoft/TypeScript/issues/2715#top
DiscussionIssues which may not have code impacthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Discussion%22
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issue-67665721
#2499https://github.com/microsoft/TypeScript/issues/2499
Nexthttps://github.com/microsoft/TypeScript/issues/2715?timeline_page=1
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
DiscussionIssues which may not have code impacthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Discussion%22
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#event-278417650
https://github.com/JamesKovacs
James Kovacs (JamesKovacs)https://github.com/JamesKovacs
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91661849
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91661939
https://github.com/yahiko00
Yahiko Uzumaki (yahiko00)https://github.com/yahiko00
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91662336
https://github.com/Steve-Fenton
Steve Fenton (Steve-Fenton)https://github.com/Steve-Fenton
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91662594
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91662760
https://github.com/yahiko00
Yahiko Uzumaki (yahiko00)https://github.com/yahiko00
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91663193
https://github.com/JamesKovacs
James Kovacs (JamesKovacs)https://github.com/JamesKovacs
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91679238
https://github.com/matijagrcic
Matija Grcic (matijagrcic)https://github.com/matijagrcic
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91681575
https://github.com/yahiko00
Yahiko Uzumaki (yahiko00)https://github.com/yahiko00
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91683400
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91685010
https://github.com/Steve-Fenton
Steve Fenton (Steve-Fenton)https://github.com/Steve-Fenton
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91689508
https://github.com/yahiko00
Yahiko Uzumaki (yahiko00)https://github.com/yahiko00
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91691604
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
Steve Fenton (@Steve-Fenton)https://github.com/Steve-Fenton
https://github.com/JamesKovacs
James Kovacs (JamesKovacs)https://github.com/JamesKovacs
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91695240
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-91695895
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 14, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-92552517
https://github.com/basarat
Basarat Ali Syed (basarat)https://github.com/basarat
on Apr 14, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-92564160
I don't like outhttps://github.com/TypeStrong/atom-typescript/blob/master/docs/out.md
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 14, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-92573198
https://github.com/basarat
Basarat Ali Syed (basarat)https://github.com/basarat
on Apr 14, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-92582959
https://github.com/basarat
Basarat Ali Syed (basarat)https://github.com/basarat
on Apr 14, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-92585726
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 14, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-92990526
Basarat Ali Syed (@basarat)https://github.com/basarat
es6-module-loader (with TypeScript support)https://github.com/vladima/es6-module-loader
https://github.com/basarat
Basarat Ali Syed (basarat)https://github.com/basarat
on Apr 14, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-93108867
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 15, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-93125427
https://github.com/basarat
Basarat Ali Syed (basarat)https://github.com/basarat
on Apr 15, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-93127506
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 29, 2015https://github.com/microsoft/TypeScript/issues/2715#event-343554454
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Jun 29, 2015https://github.com/microsoft/TypeScript/issues/2715#issuecomment-116876308
https://github.com/altano
Alan Norbauer (altano)https://github.com/altano
on Mar 6, 2016https://github.com/microsoft/TypeScript/issues/2715#issuecomment-192803830
current documentationhttps://github.com/Microsoft/TypeScript/wiki/Compiler-Options
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Mar 7, 2016https://github.com/microsoft/TypeScript/issues/2715#issuecomment-193377456
#2499https://github.com/microsoft/TypeScript/issues/2499
https://github.com/dazinator
Darrell (dazinator)https://github.com/dazinator
on Jan 4, 2017https://github.com/microsoft/TypeScript/issues/2715#issuecomment-270455580
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
microsofthttps://github.com/microsoft
on Jun 18, 2018https://github.com/microsoft/TypeScript/issues/2715#event-1686929516
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/2715
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/2715
DiscussionIssues which may not have code impacthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Discussion%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.