René's URL Explorer Experiment


Title: Proposal: The internal modifier for classes · Issue #5228 · microsoft/TypeScript · GitHub

Open Graph Title: Proposal: The internal modifier for classes · Issue #5228 · microsoft/TypeScript

X Title: Proposal: The internal modifier for classes · Issue #5228 · microsoft/TypeScript

Description: The internal modifier Often there is a need to share information on types within a program or package that should not be accessed from outside of the program or package. While the public accessibility modifier allows types to share infor...

Open Graph Description: The internal modifier Often there is a need to share information on types within a program or package that should not be accessed from outside of the program or package. While the public accessibil...

X Description: The internal modifier Often there is a need to share information on types within a program or package that should not be accessed from outside of the program or package. While the public accessibil...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: The internal modifier for classes","articleBody":"# The `internal` modifier\n\nOften there is a need to share information on types within a program or package that should not be\naccessed from outside of the program or package. While the `public` accessibility modifier allows\ntypes to share information, is insufficient for this case as consumers of the package have access\nto the information. While the `private` accessibility modifier prevents consumers of the package\nfrom accessing information from the type, it is insufficient for this case as types within the\npackage also cannot access the information. To satisfy this case, we propose the addition of the\n`internal` modifier to class members.\n## Goals\n\nThis proposal aims to describe the static semantics of the `internal` modifier as it applies to members of a class (methods, accessors, and properties).\n## Non-goals\n\nThis proposal does not cover any other use of the `internal` modifier on other declarations.\n# Static Semantics\n## Visibility\n\nWithin a _non-declaration_ file, a class member marked `internal` is treated as if it had `public`\nvisibility for any property access:\n\n**source.ts**:\n\n``` ts\nclass C {\n    internal x: number;\n}\n\nlet c = new C();\nc.x = 1; // ok\n```\n\nWhen consuming a class from a _declaration_ file, a class member marked `internal` is treated as\nif it had `private` visibility for any property access:\n\n**declaration.d.ts**\n\n``` ts\nclass C {\n    internal x: number;\n}\n```\n\n**source.ts**\n\n``` ts\n/// \u003creference path=\"declaration.d.ts\" />\nlet c = new C();\nc.x = 1; // error\n```\n## Assignability\n\nWhen checking assignability of types within a _non-declaration_ file, a class member marked\n`internal` is treated as if it had `public` visibility:\n\n**source.ts**:\n\n``` ts\nclass C {\n    internal x: number;\n}\n\ninterface X {\n    x: number;\n}\n\nlet x: X = new C(); // ok\n```\n\nIf one of the types is imported or referenced from a _declaration_ file, but the other is defined\ninside of a _non-declaration_ file, a class member marked `internal` is treated as if it had\n`private` visibility:\n\n**declaration.d.ts**\n\n``` ts\nclass C {\n    internal x: number;\n}\n```\n\n**source.ts**\n\n``` ts\n/// \u003creference path=\"declaration.d.ts\" />\ninterface X {\n}\n\nlet x: X = new C(); // error\n```\n\nIt is important to allow assignability between super- and subclasses from a declaration file\nwith overridden members marked `internal`. When both types are imported or referenced from a\n_declaration_ file, a class member marked `internal` is treated as if it had `protected` visibility:\n\n**declaration.d.ts**\n\n``` ts\nclass C {\n    internal x(): void;\n}\n\nclass D extends C {\n    internal x(): void;\n}\n```\n\n**source.ts**\n\n``` ts\n/// \u003creference path=\"declaration.d.ts\" />\nlet c: C = new D(); // ok\n```\n\nHowever, this does not carry over to subclasses that are defined in a _non-declaration_ file:\n\n**declaration.d.ts**\n\n``` ts\nclass C {\n    internal x(): void;\n}\n```\n\n**source.ts**\n\n``` ts\n/// \u003creference path=\"declaration.d.ts\" />\nclass D extends C {\n    internal x(): void; // error\n}\n```\n","author":{"url":"https://github.com/rbuckton","@type":"Person","name":"rbuckton"},"datePublished":"2015-10-12T18:27:12Z","url":"https://github.com/microsoft/TypeScript/issues/5228"}

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:f505ebdd-b865-a553-8928-849355c57ab5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idACD4:38C5CF:3FA577:541020:6B00C628
html-safe-nonceb151e48ed419d1a3a08459f5336bbcb73b8d1f2a7683b8828f9f6f74121aaaf6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0Q0OjM4QzVDRjozRkE1Nzc6NTQxMDIwOjZCMDBDNjI4IiwidmlzaXRvcl9pZCI6IjYzODg0NTk3MzIyNTU5NTAzNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc48401cc2bcec75a1ce2b5c25c2fc55ecac5e7f923a84d7c06a01bff8e57e1d4
hovercard-subject-tagissue:111028950
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/5228/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7269b145ff5003e5a0edb32919d67e1df377626853aaf986db3ea8e6a149f149/microsoft/TypeScript/issues/5228
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7269b145ff5003e5a0edb32919d67e1df377626853aaf986db3ea8e6a149f149/microsoft/TypeScript/issues/5228
og:image:altThe internal modifier Often there is a need to share information on types within a program or package that should not be accessed from outside of the program or package. While the public accessibil...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerbuckton
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/5228#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F5228
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%2F5228
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/5228
Reloadhttps://github.com/microsoft/TypeScript/issues/5228
Reloadhttps://github.com/microsoft/TypeScript/issues/5228
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/5228
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/5228
Proposal: The internal modifier for classeshttps://github.com/microsoft/TypeScript/issues/5228#top
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/rbuckton
Ron Buckton (rbuckton)https://github.com/rbuckton
on Oct 12, 2015https://github.com/microsoft/TypeScript/issues/5228#issue-111028950
Nexthttps://github.com/microsoft/TypeScript/issues/5228?timeline_page=1
Ron Buckton (rbuckton)https://github.com/rbuckton
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
on Oct 12, 2015https://github.com/microsoft/TypeScript/issues/5228#event-433230384
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Oct 12, 2015https://github.com/microsoft/TypeScript/issues/5228#event-433236689
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Oct 14, 2015https://github.com/microsoft/TypeScript/issues/5228#issuecomment-148040402
https://github.com/jbondc
Jon (jbondc)https://github.com/jbondc
on Oct 18, 2015https://github.com/microsoft/TypeScript/issues/5228#issuecomment-149037509
https://github.com/sccolbert
S. Chris Colbert (sccolbert)https://github.com/sccolbert
on Nov 5, 2015https://github.com/microsoft/TypeScript/issues/5228#issuecomment-154218542
https://github.com/alisabzevari
Ali Sabzevari (alisabzevari)https://github.com/alisabzevari
on Nov 8, 2015https://github.com/microsoft/TypeScript/issues/5228#issuecomment-154803095
https://github.com/ToddThomson
Todd Thomson (ToddThomson)https://github.com/ToddThomson
on Jan 19, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-173004420
https://github.com/shmuelie
Shmueli Englard (shmuelie)https://github.com/shmuelie
on Jan 19, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-173013985
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Jan 28, 2016https://github.com/microsoft/TypeScript/issues/5228#event-530034476
https://github.com/tetsuharuohzeki
Tetsuharu Ohzeki (tetsuharuohzeki)https://github.com/tetsuharuohzeki
on Feb 1, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-178161151
ReactiveX/rxjs#1244https://github.com/ReactiveX/rxjs/pull/1244
https://github.com/JonathanMEdwards
Jonathan Edwards (JonathanMEdwards)https://github.com/JonathanMEdwards
on Mar 3, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-191749883
internalhttps://github.com/internal
https://github.com/TheLevenCreations
TheLevenCreationshttps://github.com/TheLevenCreations
on Mar 12, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-195645373
https://github.com/bartzy
Bar Ziony (bartzy)https://github.com/bartzy
on May 16, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-219437211
https://github.com/jelbourn
Jeremy Elbourn (jelbourn)https://github.com/jelbourn
on May 26, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-221973357
https://github.com/kito99
Kito D. Mann (kito99)https://github.com/kito99
on Jul 1, 2016https://github.com/microsoft/TypeScript/issues/5228#issuecomment-229974886
https://github.com/jimsugg
Jim Sugg (jimsugg)https://github.com/jimsugg
on Jul 17, 2020https://github.com/microsoft/TypeScript/issues/5228#issuecomment-660357380
internalhttps://github.com/internal
internalhttps://github.com/internal
https://github.com/Xample
Flavien Volken (Xample)https://github.com/Xample
on Dec 19, 2020https://github.com/microsoft/TypeScript/issues/5228#issuecomment-748477670
https://github.com/lorenzodallavecchia
Lorenzo Dalla Vecchia (lorenzodallavecchia)https://github.com/lorenzodallavecchia
on Dec 19, 2020https://github.com/microsoft/TypeScript/issues/5228#issuecomment-748484473
Flavien Volken (@Xample)https://github.com/Xample
https://github.com/KostyaTretyak
Костя Третяк (KostyaTretyak)https://github.com/KostyaTretyak
on Dec 19, 2020https://github.com/microsoft/TypeScript/issues/5228#issuecomment-748490321
this commenthttps://github.com/microsoft/TypeScript/issues/22677#issuecomment-696381041
https://github.com/Lusito
Lusitohttps://github.com/Lusito
on Dec 29, 2020https://github.com/microsoft/TypeScript/issues/5228#issuecomment-752228124
recasthttps://github.com/benjamn/recast
https://github.com/Lusito/idtschttps://github.com/Lusito/idtsc
sample input/outputhttps://github.com/Lusito/idtsc#example
https://github.com/woldie
woldiehttps://github.com/woldie
on Apr 10, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-817144416
John Crim (@johncrim)https://github.com/johncrim
https://jsdoc.app/tags-package.htmlhttps://jsdoc.app/tags-package.html
#321https://github.com/microsoft/TypeScript/issues/321
Rob Eisenberg (@EisenbergEffect)https://github.com/EisenbergEffect
https://github.com/cmcnicholas
Craig McNicholas (cmcnicholas)https://github.com/cmcnicholas
on Apr 15, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-820422475
https://github.com/ReeceGordon
ReeceGordonhttps://github.com/ReeceGordon
on Apr 15, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-820427227
https://github.com/LukeBrandon
Luke Brandon (LukeBrandon)https://github.com/LukeBrandon
on Jun 3, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-854171637
https://github.com/tylerthecoder
Tyler Tracy (tylerthecoder)https://github.com/tylerthecoder
on Jun 4, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-854781515
https://github.com/jr-grenoble
Jean-Rene Bouvier (jr-grenoble)https://github.com/jr-grenoble
on Jun 9, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-858033029
https://github.com/FilipeBeck
Filipe Beck (FilipeBeck)https://github.com/FilipeBeck
on Oct 4, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-933071880
https://github.com/lorenzodallavecchia
Lorenzo Dalla Vecchia (lorenzodallavecchia)https://github.com/lorenzodallavecchia
on Oct 6, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-936225251
api-extractorhttps://github.com/microsoft/rushstack/tree/master/apps/api-extractor
#4433https://github.com/microsoft/TypeScript/issues/4433
https://github.com/sdegutis
sdegutishttps://github.com/sdegutis
on Nov 4, 2021https://github.com/microsoft/TypeScript/issues/5228#issuecomment-961404725
https://github.com/TurboEncabulator9000
TurboEncabulator9000https://github.com/TurboEncabulator9000
on Nov 2, 2023https://github.com/microsoft/TypeScript/issues/5228#issuecomment-1789926037
sdegutishttps://github.com/sdegutis
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/5228
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/5228
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%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.