René's URL Explorer Experiment


Title: Partial modules and output optimization · Issue #447 · microsoft/TypeScript · GitHub

Open Graph Title: Partial modules and output optimization · Issue #447 · microsoft/TypeScript

X Title: Partial modules and output optimization · Issue #447 · microsoft/TypeScript

Description: We have a typescript application and a use a file per class. There are lots of benefits to this the major one being source control conflict reduction. We compile our app using the --out compiler flag but I think there is room for some se...

Open Graph Description: We have a typescript application and a use a file per class. There are lots of benefits to this the major one being source control conflict reduction. We compile our app using the --out compiler fl...

X Description: We have a typescript application and a use a file per class. There are lots of benefits to this the major one being source control conflict reduction. We compile our app using the --out compiler fl...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Partial modules and output optimization","articleBody":"We have a typescript application and a use a file per class. There are lots of benefits to this the major one being source control conflict reduction. \n\nWe compile our app using the --out compiler flag but I think there is room for some serious optimization of the compilers output for modules. \n\nCurrently if you have two classes defined in separate files the compile generates the following JavaScript. \n\n``` javascript\nvar Example;\n(function (Example) {\n    (function (Nested) {\n        (function (Issue) {\n            var bar = (function () {\n                function bar() {\n                }\n                return bar;\n            })();\n            Issue.bar = bar;\n        })(Nested.Issue || (Nested.Issue = {}));\n        var Issue = Nested.Issue;\n    })(Example.Nested || (Example.Nested = {}));\n    var Nested = Example.Nested;\n})(Example || (Example = {}));\n\nvar Example;\n(function (Example) {\n    (function (Nested) {\n        (function (Issue) {\n            var foo = (function () {\n                function foo() {\n                }\n                return foo;\n            })();\n            Issue.foo = foo;\n        })(Nested.Issue || (Nested.Issue = {}));\n        var Issue = Nested.Issue;\n    })(Example.Nested || (Example.Nested = {}));\n    var Nested = Example.Nested;\n})(Example || (Example = {}));\n```\n\nI suggest a compiler flag that composes all classes/ functions etc under a single module declaration? So the output code would be like the example below. This would dramatically reduce the size of the JavaScript the compiler outputs. I estimate that our app which currently compiles to around 15,000 lines of probably be only be 2000 lines if this were available.\n\n``` javascript\nvar Example;\n(function (Example) {\n    (function (Nested) {\n        (function (Issue) {\n            var bar = (function () {\n                function bar() {\n                }\n                return bar;\n            })();\n            Issue.bar = bar;\n            var foo = (function () {\n                function foo() {\n                }\n                return foo;\n            })();\n            Issue.foo = foo;\n        })(Nested.Issue || (Nested.Issue = {}));\n        var Issue = Nested.Issue;\n    })(Example.Nested || (Example.Nested = {}));\n    var Nested = Example.Nested;\n})(Example || (Example = {}));\n```\n","author":{"url":"https://github.com/Davidhanson90","@type":"Person","name":"Davidhanson90"},"datePublished":"2014-08-13T16:42:17Z","url":"https://github.com/microsoft/TypeScript/issues/447"}

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:b344087b-fc3c-f301-09c5-0f8d4c5ca224
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA60A:33D24F:15BA1E:1CCC60:6B00C97D
html-safe-nonced8c304e268c4d2a7f04ceb60669a19f835cd336f8c7d26158952e4ddc2dcf42e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjBBOjMzRDI0RjoxNUJBMUU6MUNDQzYwOjZCMDBDOTdEIiwidmlzaXRvcl9pZCI6IjQ5ODAwNjIzNTQ0Mjg0NDcxMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac206912aecd1a41cf030c46f1a6e024a54dc985620d6f2406b7ca0cea5829e565
hovercard-subject-tagissue:40173821
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/447/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bf090ab3abb67b58e3012698c0a7627596c287ea78e3633f158061523e046dd9/microsoft/TypeScript/issues/447
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bf090ab3abb67b58e3012698c0a7627596c287ea78e3633f158061523e046dd9/microsoft/TypeScript/issues/447
og:image:altWe have a typescript application and a use a file per class. There are lots of benefits to this the major one being source control conflict reduction. We compile our app using the --out compiler fl...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDavidhanson90
hostnamegithub.com
expected-hostnamegithub.com
None98dc00e171c204462a6f367482a0f8c3c6b5dbca99cd7390e82d2df49ce096e4
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
releaseef013399cf0a3c324bea644a685d7c1e0f06b5b7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/447#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F447
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%2F447
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/447
Reloadhttps://github.com/microsoft/TypeScript/issues/447
Reloadhttps://github.com/microsoft/TypeScript/issues/447
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests307 (307)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/447
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/447
Partial modules and output optimizationhttps://github.com/microsoft/TypeScript/issues/447#top
DeclinedThe issue was declined as something which matches the TypeScript visionhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Declined%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/Davidhanson90
LordHanson (Davidhanson90)https://github.com/Davidhanson90
on Aug 13, 2014https://github.com/microsoft/TypeScript/issues/447#issue-40173821
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Aug 13, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-52081127
https://github.com/Davidhanson90
LordHanson (Davidhanson90)https://github.com/Davidhanson90
on Aug 13, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-52102157
https://github.com/RamIdeas
Rahul Sethi (RamIdeas)https://github.com/RamIdeas
on Aug 14, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-52198263
codeplexhttps://typescript.codeplex.com/workitem/1868
https://github.com/Davidhanson90
LordHanson (Davidhanson90)https://github.com/Davidhanson90
on Aug 14, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-52239973
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs More Infohttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%22
on Aug 18, 2014https://github.com/microsoft/TypeScript/issues/447#event-154109629
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Aug 18, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-52540064
https://github.com/Davidhanson90
LordHanson (Davidhanson90)https://github.com/Davidhanson90
on Aug 29, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-53859579
https://github.com/charlessolar
Charles Solar (charlessolar)https://github.com/charlessolar
on Sep 7, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-54748273
http://www.typescriptlang.org/Handbook#modules-pitfalls-of-moduleshttp://www.typescriptlang.org/Handbook#modules-pitfalls-of-modules
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on Sep 8, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-54886374
Volak (@Volak)https://github.com/Volak
https://github.com/charlessolar
Charles Solar (charlessolar)https://github.com/charlessolar
on Sep 8, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-54887101
Dan Quirk (@danquirk)https://github.com/danquirk
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on Sep 8, 2014https://github.com/microsoft/TypeScript/issues/447#issuecomment-54888409
#17https://github.com/microsoft/TypeScript/issues/17
LordHanson (Davidhanson90)https://github.com/Davidhanson90
on Nov 30, 2014https://github.com/microsoft/TypeScript/issues/447#event-200234927
https://github.com/Davidhanson90
LordHanson (Davidhanson90)https://github.com/Davidhanson90
on Aug 19, 2015https://github.com/microsoft/TypeScript/issues/447#issuecomment-132510357
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/parser.tshttps://github.com/Microsoft/TypeScript/blob/master/src/compiler/parser.ts
https://github.com/seshualluvada
Seshu Alluvada (seshualluvada)https://github.com/seshualluvada
on Jan 14, 2016https://github.com/microsoft/TypeScript/issues/447#issuecomment-171783219
#6457https://github.com/microsoft/TypeScript/issues/6457
https://github.com/gulbanana
gulbananahttps://github.com/gulbanana
on Oct 4, 2016https://github.com/microsoft/TypeScript/issues/447#issuecomment-251288754
https://github.com/fis-cz
Fis (fis-cz)https://github.com/fis-cz
on May 8, 2017https://github.com/microsoft/TypeScript/issues/447#issuecomment-299953978
https://github.com/fis-cz
Fis (fis-cz)https://github.com/fis-cz
on May 13, 2017https://github.com/microsoft/TypeScript/issues/447#issuecomment-301270952
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Dec 16, 2021https://github.com/microsoft/TypeScript/issues/447#issuecomment-995333619
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 16, 2021https://github.com/microsoft/TypeScript/issues/447#event-5775138702
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
DeclinedThe issue was declined as something which matches the TypeScript visionhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Declined%22
Needs More InfoThe issue still hasn't been fully clarifiedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%22
on Dec 16, 2021https://github.com/microsoft/TypeScript/issues/447#event-5775139148
https://github.com/gulbanana
gulbananahttps://github.com/gulbanana
on Dec 16, 2021https://github.com/microsoft/TypeScript/issues/447#issuecomment-995701664
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/447
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/447
DeclinedThe issue was declined as something which matches the TypeScript visionhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Declined%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%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.