René's URL Explorer Experiment


Title: Instance member function becomes instance member property in mapped types · Issue #38496 · microsoft/TypeScript · GitHub

Open Graph Title: Instance member function becomes instance member property in mapped types · Issue #38496 · microsoft/TypeScript

X Title: Instance member function becomes instance member property in mapped types · Issue #38496 · microsoft/TypeScript

Description: TypeScript Version: 4.0.0-dev.20200512 Search Terms: instance member function becomes instance member property mixin property of exported class expression may not be private or protected Code export class Application { protected getState...

Open Graph Description: TypeScript Version: 4.0.0-dev.20200512 Search Terms: instance member function becomes instance member property mixin property of exported class expression may not be private or protected Code expor...

X Description: TypeScript Version: 4.0.0-dev.20200512 Search Terms: instance member function becomes instance member property mixin property of exported class expression may not be private or protected Code expor...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Instance member function becomes instance member property in mapped types","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!--\r\nPlease try to reproduce the issue with the latest published version. It may have already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n-->\r\n**TypeScript Version:**  `4.0.0-dev.20200512`\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n- instance member function becomes instance member property\r\n- mixin property of exported class expression may not be private or protected\r\n\r\n**Code**\r\n\r\n```ts\r\nexport class Application {\r\n  protected getState() {\r\n    return 'starting';\r\n  }\r\n\r\n  component(componentCtor: typeof Object) {\r\n    // mount the component\r\n  }\r\n}\r\n\r\n// Ideally, I'd like to write `function repositoryMixin(superClass: typeof Application)`, but that\r\n// triggers \"property of exported class expression may not be private or protected\"\r\nexport function repositoryMixin\u003cT extends MixinTarget\u003cApplication>>(superClass: T) {\r\n  return class extends superClass {\r\n    component(componentCtor: typeof Object) {\r\n      super.component(componentCtor);\r\n      // register repositories contributed by the component\r\n    }\r\n  }\r\n}\r\n\r\n// helpers to work around TypeScript limitations related to mixins\r\n\r\nexport type Constructor\u003cT extends object> = new (...args: any[]) => T;\r\n\r\nexport type MixinTarget\u003cT extends object> = Constructor\u003c\r\n  {\r\n    // Enumerate only public members to avoid the following compiler error:\r\n    //   Property '(some-name)' of exported class expression\r\n    //   may not be private or protected. ts(4094)\r\n    [p in keyof T]: T[p];\r\n  }\r\n>;\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nThe code compiles cleanly.\r\n\r\n**Actual behavior:**\r\n\r\n```\r\n$  tsc mixin-bug.ts\r\nmixin-bug.ts:13:5 - error TS2425: Class '{ component: (componentCtor: ObjectConstructor) => void; }' defines instance member property 'component', but extended class '(Anonymous class)' defines it as instance member function.\r\n\r\n13     component(componentCtor: typeof Object) {\r\n       ~~~~~~~~~\r\n\r\nmixin-bug.ts:14:13 - error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.\r\n\r\n14       super.component(componentCtor);\r\n               ~~~~~~~~~\r\n\r\n\r\nFound 2 errors.\r\n```\r\n\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\n\r\nhttps://www.typescriptlang.org/play/?ts=Nightly#code/MYGwhgzhAECCAO8QEthgC7IPYDtoG8AoaaYLAW3lwFMd0AKMymugYXSwCcAuadAT3jUsAM2gB5AEYArasHQBKAsRLQA9GujksAVzp8AFtVIUqOWuhUBfQjcIi987Hk7UqEZB078AssgAeyDgAPAAq0NT+6LQAJjB+gTihYJwA5tTowQhIqBjOAHz59BA6Qpys4FC8oUpEJK7oOpx4oJAwkdE4cdAlZRVtyqomzOZ0jKYs6OxcvAJCohIycoqDQz2l1JwAdExmFuMjFtOcCgDcKkMa0K6pyBDRnNduWB5eyNQwZHScyJI60TFoJJ+IZjLtJhdoDYSDY7FcjCAyjAONAAO5cADW0BSui60FCgmoAGVgD94OhoChyJ48rgYK5wAC+FgtAEghBCIRIlROBS5sZWHT0JwdPIuGEIlFYjAsEt5PloABeaDmVHQehbTUpVIQXhgHD8ADaAF0lIqFaFzlz-Dy+YToAkgsk0hkJR1pdBZbJ5UroIKcPcRWLOMEVHVVFcAKI4HTkTYYYy4EAg+A6SQoYBaajkSSbZEssAANywyEB6CM0BEWBAICwqKCqWG8GQIE2EU4nBmkKuJAACp2ygJoAByeg4MBxhTDz1iblcJmtKCS+CuKDObuaEjkMAgnBYCm56Ar5CFhOex4r-fLagxLboCD0AAsAAYAJyPhSQw3waBBaAY6h+AWUJjWqb9jXOGFCHyc4gADy+YToAkgsk0hkJR1pdBZbJ5UroIKcPcRWLOMEVHVVFcAKI4HTkTYYYy4EAg+A6SQoYBaajkSSbZEssAANywyEB6CM0BEWBAICwqKCqWG8GQIE2EU4nBmkKuJAACp2ygJoAByeg4MBxhTDz1iblcJmtKCS+CuKDObuaEjkMAgnBYCm56Ar5CFhOex4r-fLagxLboCD0AAsAAYAJyPhSQw3waBBaAY6h+AWUJjWqb9jXOGFCHyc4gA\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\n\r\n- Remove property-override-method error #34494\r\n- 3.7: instance member function becomes instance member property in type references [outcome: fixed since 3.7.0-dev.20191016] #33747\r\n- Support for all type features in declaration files. #35822\r\n- False error TS4094: ... exported class expression may not be private or protected. #30355\r\n- Allow .d.ts files to represent anonymous class expressions with `private` members #36060\r\n- Unexpected TS4094 with the build parameter `declaration: true`#17293\r\n- Generating type definitions for mixin classes with protected members #17744","author":{"url":"https://github.com/bajtos","@type":"Person","name":"bajtos"},"datePublished":"2020-05-12T08:11:23Z","url":"https://github.com/microsoft/TypeScript/issues/38496"}

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:2ab4398b-ca46-6a00-dd92-5819bebb2341
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD7A8:31D532:562EED:71FD30:6B019E82
html-safe-nonce256098b571e482d6e503fdafb107f8901da547bd618a77b7149d6ddda157333e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0E4OjMxRDUzMjo1NjJFRUQ6NzFGRDMwOjZCMDE5RTgyIiwidmlzaXRvcl9pZCI6IjkwNTQzODYwMzQ5OTI4NDg1MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaced8f67047d82692dcd35374c85fcdb82bd10749b0db762069348c84f5f01bc5e
hovercard-subject-tagissue:616452895
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/38496/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1d128cded854011be35d262de2b2b3e5eac7905be7eda60ac8ed9d49e0196278/microsoft/TypeScript/issues/38496
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1d128cded854011be35d262de2b2b3e5eac7905be7eda60ac8ed9d49e0196278/microsoft/TypeScript/issues/38496
og:image:altTypeScript Version: 4.0.0-dev.20200512 Search Terms: instance member function becomes instance member property mixin property of exported class expression may not be private or protected Code expor...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebajtos
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/38496#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F38496
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%2F38496
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/38496
Reloadhttps://github.com/microsoft/TypeScript/issues/38496
Reloadhttps://github.com/microsoft/TypeScript/issues/38496
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/38496
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/38496
Instance member function becomes instance member property in mapped typeshttps://github.com/microsoft/TypeScript/issues/38496#top
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/bajtos
Miroslav Bajtoš (bajtos)https://github.com/bajtos
on May 12, 2020https://github.com/microsoft/TypeScript/issues/38496#issue-616452895
https://www.typescriptlang.org/play/?ts=Nightly#code/MYGwhgzhAECCAO8QEthgC7IPYDtoG8AoaaYLAW3lwFMd0AKMymugYXSwCcAuadAT3jUsAM2gB5AEYArasHQBKAsRLQA9GujksAVzp8AFtVIUqOWuhUBfQjcIi987Hk7UqEZB078AssgAeyDgAPAAq0NT+6LQAJjB+gTihYJwA5tTowQhIqBjOAHz59BA6Qpys4FC8oUpEJK7oOpx4oJAwkdE4cdAlZRVtyqomzOZ0jKYs6OxcvAJCohIycoqDQz2l1JwAdExmFuMjFtOcCgDcKkMa0K6pyBDRnNduWB5eyNQwZHScyJI60TFoJJ+IZjLtJhdoDYSDY7FcjCAyjAONAAO5cADW0BSui60FCgmoAGVgD94OhoChyJ48rgYK5wAC+FgtAEghBCIRIlROBS5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cRWLOMEVHVVFcAKI4HTkTYYYy4EAg+A6SQoYBaajkSSbZEssAANywyEB6CM0BEWBAICwqKCqWG8GQIE2EU4nBmkKuJAACp2ygJoAByeg4MBxhTDz1iblcJmtKCS+CuKDObuaEjkMAgnBYCm56Ar5CFhOex4r-fLagxLboCD0AAsAAYAJyPhSQw3waBBaAY6h+AWUJjWqb9jXOGFCHyc4gADy+YToAkgsk0hkJR1pdBZbJ5UroIKcPcRWLOMEVHVVFcAKI4HTkTYYYy4EAg+A6SQoYBaajkSSbZEssAANywyEB6CM0BEWBAICwqKCqWG8GQIE2EU4nBmkKuJAACp2ygJoAByeg4MBxhTDz1iblcJmtKCS+CuKDObuaEjkMAgnBYCm56Ar5CFhOex4r-fLagxLboCD0AAsAAYAJyPhSQw3waBBaAY6h+AWUJjWqb9jXOGFCHyc4gA
Remove property-override-method error #34494https://github.com/microsoft/TypeScript/pull/34494
3.7: instance member function becomes instance member property in type references [outcome: fixed since 3.7.0-dev.20191016] #33747https://github.com/microsoft/TypeScript/issues/33747
Support for all type features in declaration files. #35822https://github.com/microsoft/TypeScript/issues/35822
False error TS4094: ... exported class expression may not be private or protected. #30355https://github.com/microsoft/TypeScript/issues/30355
Allow .d.ts files to represent anonymous class expressions with private members #36060https://github.com/microsoft/TypeScript/issues/36060
Unexpected TS4094 with the build parameter declaration: true #17293https://github.com/microsoft/TypeScript/issues/17293
Generating type definitions for mixin classes with protected members #17744https://github.com/microsoft/TypeScript/issues/17744
https://github.com/bajtos
Miroslav Bajtoš (bajtos)https://github.com/bajtos
on May 12, 2020https://github.com/microsoft/TypeScript/issues/38496#issuecomment-627187514
#36060https://github.com/microsoft/TypeScript/issues/36060
#30355https://github.com/microsoft/TypeScript/issues/30355
#17293https://github.com/microsoft/TypeScript/issues/17293
#35822https://github.com/microsoft/TypeScript/issues/35822
#17744https://github.com/microsoft/TypeScript/issues/17744
Mapped typehttps://www.typescriptlang.org/docs/handbook/advanced-types.html#mapped-types
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Jun 5, 2020https://github.com/microsoft/TypeScript/issues/38496#event-3413488279
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Jun 5, 2020https://github.com/microsoft/TypeScript/issues/38496#event-3413488401
https://github.com/jcalz
Joe Calzaretta (jcalz)https://github.com/jcalz
on Oct 7, 2020https://github.com/microsoft/TypeScript/issues/38496#issuecomment-704638751
#27689https://github.com/microsoft/TypeScript/issues/27689
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/38496
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/38496
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
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.