René's URL Explorer Experiment


Title: False error TS4094: ... exported class expression may not be private or protected. · Issue #30355 · microsoft/TypeScript · GitHub

Open Graph Title: False error TS4094: ... exported class expression may not be private or protected. · Issue #30355 · microsoft/TypeScript

X Title: False error TS4094: ... exported class expression may not be private or protected. · Issue #30355 · microsoft/TypeScript

Description: TypeScript Version: 3.3.3333 Code src/test.ts: export function test () { return class { private privateMember () { } }; } tsconfig.json: { "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": true }, "include": [ "s...

Open Graph Description: TypeScript Version: 3.3.3333 Code src/test.ts: export function test () { return class { private privateMember () { } }; } tsconfig.json: { "compilerOptions": { "target": "es5", "module": "commonjs"...

X Description: TypeScript Version: 3.3.3333 Code src/test.ts: export function test () { return class { private privateMember () { } }; } tsconfig.json: { "compilerOptions": { "target": "e...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"False error TS4094: ... exported class expression may not be private or protected.","articleBody":"**TypeScript Version:**  3.3.3333\r\n\r\n**Code**\r\n\r\n_src/test.ts:_\r\n```ts\r\nexport function test () {\r\n    return class {\r\n        private privateMember () {\r\n        }\r\n    };\r\n}\r\n```\r\n\r\n_tsconfig.json:_\r\n```json\r\n{\r\n    \"compilerOptions\": {\r\n        \"target\": \"es5\",\r\n        \"module\": \"commonjs\",\r\n        \"declaration\": true\r\n    },\r\n    \"include\": [\r\n        \"src/**/*\"\r\n    ],\r\n    \"exclude\": [\r\n        \"node_modules\"\r\n    ]\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nNo compilation error.\r\n\r\n**Actual behavior:**\r\nCompiler prints error:\r\n$ tsc\r\nsrc/test.ts(1,17): error TS4094: Property 'privateMember' of exported class expression may not be private or protected.\r\n\r\n**Playground Link:** not possible to provide.\r\n\r\n**Workaround**\r\n\r\nDeclare the return type explicitly:\r\n\r\n```ts\r\nexport function test (): new() => Object {\r\n    return class {\r\n        private privateMember () {\r\n        }\r\n    };\r\n}\r\n```\r\n","author":{"url":"https://github.com/a-student","@type":"Person","name":"a-student"},"datePublished":"2019-03-13T09:49:29Z","url":"https://github.com/microsoft/TypeScript/issues/30355"}

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:84be65f8-2583-6502-0d97-4313d49a75df
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB4A4:19E4BB:283CB2C:3353864:6B01A1F6
html-safe-nonce7c409f129018df9c8d934e45b5eff87f923e0baa72e5de073db7ce253af15f9a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEE0OjE5RTRCQjoyODNDQjJDOjMzNTM4NjQ6NkIwMUExRjYiLCJ2aXNpdG9yX2lkIjoiMjEwNzk0NzUwNTE3Mjk4MDIxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacef5a3ad9713895ad84807767df3cee0dcc50f83e65b47e50a6dd90a549a68235
hovercard-subject-tagissue:420405363
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/30355/issue_layout
twitter:imagehttps://opengraph.githubassets.com/49d9c96c6675807916405c550f3762dc4224225ddf6db81d55b6daaa7313abf5/microsoft/TypeScript/issues/30355
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/49d9c96c6675807916405c550f3762dc4224225ddf6db81d55b6daaa7313abf5/microsoft/TypeScript/issues/30355
og:image:altTypeScript Version: 3.3.3333 Code src/test.ts: export function test () { return class { private privateMember () { } }; } tsconfig.json: { "compilerOptions": { "target": "es5", "module": "commonjs"...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamea-student
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/30355#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F30355
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%2F30355
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/30355
Reloadhttps://github.com/microsoft/TypeScript/issues/30355
Reloadhttps://github.com/microsoft/TypeScript/issues/30355
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/30355
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/30355
False error TS4094: ... exported class expression may not be private or protected.https://github.com/microsoft/TypeScript/issues/30355#top
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
https://github.com/a-student
a-studenthttps://github.com/a-student
on Mar 13, 2019https://github.com/microsoft/TypeScript/issues/30355#issue-420405363
Nexthttps://github.com/microsoft/TypeScript/issues/30355?timeline_page=1
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
on Mar 14, 2019https://github.com/microsoft/TypeScript/issues/30355#event-2204805280
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 14, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-473060190
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Mar 17, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-473709104
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 17, 2019https://github.com/microsoft/TypeScript/issues/30355#event-2208884296
https://github.com/a-student
a-studenthttps://github.com/a-student
on Mar 18, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-473849281
https://github.com/taoqf
taoqf (taoqf)https://github.com/taoqf
on Apr 3, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-479329978
https://github.com/ozyman42
Alex Leung (ozyman42)https://github.com/ozyman42
on Apr 28, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-487332248
https://github.com/cdata
Christopher Joel (cdata)https://github.com/cdata
on Sep 17, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-532436062
https://github.com/trusktr
Joe Pea (trusktr)https://github.com/trusktr
on Oct 8, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-539370178
https://github.com/trusktr
Joe Pea (trusktr)https://github.com/trusktr
on Oct 8, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-539396576
Example on playgroundhttp://www.typescriptlang.org/play/#code/C4TwDgpgBAyg9gWwgFXBAPMgfFAvFAQQCciBDETLAWAChaATCAYwBtSjoAzAVwDsngASzi8onOHEoAKdgHMAXFGQBKRfCSpIlWrVCQoAIXZ4oAb17cEiiwgBGEIgF8dNPdABiEo0RMAlCMDcRLyaGG5wnGISOAD0MVB8ANa8cADuvADaALpAA
https://github.com/trusktr
Joe Pea (trusktr)https://github.com/trusktr
on Oct 8, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-539397891
https://github.com/trusktr
Joe Pea (trusktr)https://github.com/trusktr
on Dec 21, 2019https://github.com/microsoft/TypeScript/issues/30355#issuecomment-568207269
#35822https://github.com/microsoft/TypeScript/issues/35822
https://github.com/trusktr
Joe Pea (trusktr)https://github.com/trusktr
on Jan 7, 2020https://github.com/microsoft/TypeScript/issues/30355#issuecomment-571736633
#36060https://github.com/microsoft/TypeScript/issues/36060
https://github.com/sebastiandittrich
Sebastian Dittrich (sebastiandittrich)https://github.com/sebastiandittrich
on Aug 9, 2020https://github.com/microsoft/TypeScript/issues/30355#issuecomment-671095933
https://github.com/gumT3KBZ9zMY7kzv
gumT3KBZ9zMY7kzvhttps://github.com/gumT3KBZ9zMY7kzv
on May 12, 2021https://github.com/microsoft/TypeScript/issues/30355#issuecomment-839834550
https://github.com/chlbri
chlbri (chlbri)https://github.com/chlbri
on Nov 18, 2022https://github.com/microsoft/TypeScript/issues/30355#issuecomment-1320168471
vitesthttps://www.npmjs.com/package/vitest
https://github.com/leppaott
leppaotthttps://github.com/leppaott
on Feb 2, 2023https://github.com/microsoft/TypeScript/issues/30355#issuecomment-1413739506
https://github.com/Marckon
Liu CZ (Marckon)https://github.com/Marckon
on Apr 11, 2023https://github.com/microsoft/TypeScript/issues/30355#issuecomment-1502617527
https://github.com/zyf0330
zhaoyunfeng (zyf0330)https://github.com/zyf0330
on Jun 2, 2023https://github.com/microsoft/TypeScript/issues/30355#issuecomment-1573048789
https://github.com/ThePlenkov
Petr Plenkov (ThePlenkov)https://github.com/ThePlenkov
on Aug 11, 2023https://github.com/microsoft/TypeScript/issues/30355#issuecomment-1674613398
https://github.com/ThePlenkov
Petr Plenkov (ThePlenkov)https://github.com/ThePlenkov
on Aug 18, 2023https://github.com/microsoft/TypeScript/issues/30355#issuecomment-1683910634
Milan Raj (rajsite)https://github.com/rajsite
on Oct 5, 2023https://github.com/microsoft/TypeScript/issues/30355#event-10569421368
Create Angular mixins for fractional-width columns and groupable colu…https://github.com/ni/nimble/commit/c074575be1bd09e3d04b1747bfc3a782eefbbd09
c074575https://github.com/ni/nimble/commit/c074575be1bd09e3d04b1747bfc3a782eefbbd09
Aubrey (Sanae6)https://github.com/Sanae6
on Nov 18, 2023https://github.com/microsoft/TypeScript/issues/30355#event-11002551691
https://github.com/microsoft/TypeScript/issues/30355https://github.com/roobscoob/nnfileabstraction/commit/51296a2b5d5791a7b701448a023ad48604e6d70e
51296a2https://github.com/roobscoob/nnfileabstraction/commit/51296a2b5d5791a7b701448a023ad48604e6d70e
https://github.com/StiliyanKushev
Stiliyan Kushev (StiliyanKushev)https://github.com/StiliyanKushev
on Jan 29, 2025https://github.com/microsoft/TypeScript/issues/30355#issuecomment-2622851569
Adrien Minne (hokolomopo)https://github.com/hokolomopo
on Apr 25, 2025https://github.com/microsoft/TypeScript/issues/30355#event-17406988450
[FIX] ts: fix compiling of `.d.ts` fileshttps://github.com/odoo/o-spreadsheet/commit/f31823e956a4a337ea91d1c1b8506284e8e2e372
f31823ehttps://github.com/odoo/o-spreadsheet/commit/f31823e956a4a337ea91d1c1b8506284e8e2e372
Odoo's Mergebot (robodoo)https://github.com/robodoo
on Apr 30, 2025https://github.com/microsoft/TypeScript/issues/30355#event-17467275101
[FIX] ts: fix compiling of `.d.ts` fileshttps://github.com/odoo/o-spreadsheet/commit/ce701a6cb16a23d4650b7d386f8fc0bd0ea76ca2
ce701a6https://github.com/odoo/o-spreadsheet/commit/ce701a6cb16a23d4650b7d386f8fc0bd0ea76ca2
Otis - Odoo Forward-Port Steward [bot] (fw-bot)https://github.com/fw-bot
on Apr 30, 2025https://github.com/microsoft/TypeScript/issues/30355#event-17467354644
[FIX] ts: fix compiling of `.d.ts` fileshttps://github.com/odoo/o-spreadsheet/commit/b6f48d8c7524fb91cbef5e609a9f05bc830acf7b
b6f48d8https://github.com/odoo/o-spreadsheet/commit/b6f48d8c7524fb91cbef5e609a9f05bc830acf7b
Adrien Minne (hokolomopo)https://github.com/hokolomopo
on Apr 30, 2025https://github.com/microsoft/TypeScript/issues/30355#event-17468977284
[FIX] ts: fix compiling of `.d.ts` fileshttps://github.com/odoo/o-spreadsheet/commit/67e1e828d8f080c6a6a7c484c6c9477052e6bc13
67e1e82https://github.com/odoo/o-spreadsheet/commit/67e1e828d8f080c6a6a7c484c6c9477052e6bc13
Odoo's Mergebot (robodoo)https://github.com/robodoo
on Apr 30, 2025https://github.com/microsoft/TypeScript/issues/30355#event-17469097158
[FIX] ts: fix compiling of `.d.ts` fileshttps://github.com/odoo/o-spreadsheet/commit/c3d7040e6e92301a9dab3f1ca149126792bc8e00
c3d7040https://github.com/odoo/o-spreadsheet/commit/c3d7040e6e92301a9dab3f1ca149126792bc8e00
microsofthttps://github.com/microsoft
on Oct 21, 2025https://github.com/microsoft/TypeScript/issues/30355#event-20415918060
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/30355
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/30355
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%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.