René's URL Explorer Experiment


Title: Feature Request / Proposal: Traits · Issue #311 · microsoft/TypeScript · GitHub

Open Graph Title: Feature Request / Proposal: Traits · Issue #311 · microsoft/TypeScript

X Title: Feature Request / Proposal: Traits · Issue #311 · microsoft/TypeScript

Description: ORIGINALLY PROPOSED IN http://typescript.codeplex.com/workitem/838 Traits, as "compile-time" partial classes, would perfectly fit with TS ideology and resolve problems of multiple inheritance/mixins. Traits in Scala: http://en.wikibooks....

Open Graph Description: ORIGINALLY PROPOSED IN http://typescript.codeplex.com/workitem/838 Traits, as "compile-time" partial classes, would perfectly fit with TS ideology and resolve problems of multiple inheritance/mixin...

X Description: ORIGINALLY PROPOSED IN http://typescript.codeplex.com/workitem/838 Traits, as "compile-time" partial classes, would perfectly fit with TS ideology and resolve problems of multiple inherit...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature Request / Proposal: Traits","articleBody":"ORIGINALLY PROPOSED IN http://typescript.codeplex.com/workitem/838\n\nTraits, as \"compile-time\" partial classes, would perfectly fit with TS ideology and resolve problems of multiple inheritance/mixins.\n\nTraits in Scala: http://en.wikibooks.org/wiki/Scala/Traits\nTraits in PHP: http://php.net/trait\n\nI propose minimal traits similar to PHP implementation.\n\n``` typescript\ntrait FooTrait {\n   // same as class definition, but no constructor allowed, e.g.:\n   public foo() {\n       return \"foo\";\n   }\n   private bar() {\n       return \"bar\";\n   }\n}\n\nclass Foo {\n    import FooTrait; //not insisting on exact keyword and syntax, just smth to start with\n\n    // ...\n}\n\nclass Bar {\n    // rename methods:\n    import FooTrait(foo => tfoo, bar => tbar);\n\n    // and to include another trait, there is another import line:\n    // import BarTrait;\n\n    // ...\n}\n```\n\nThe code above could be compiled to JS below (can be optimized, just showing the main idea):\n\n``` javascript\nvar FooTrait = (function () {\n    function FooTrait() {\n        throw \"Cannot instantiate trait FooTrait\";\n    }\n    FooTrait.prototype.foo = function () {\n        return \"foo\";\n    };\n    FooTrait.prototype.bar = function () {\n        return \"bar\";\n    };\n    return FooTrait;\n})();\n\nvar Foo = (function (_super, FooTrait) {\n    function Foo() { }\n    Foo.prototype.foo = FooTrait.prototype.foo;\n    Foo.prototype.bar = FooTrait.prototype.bar;\n    return Foo;\n})(undefined, FooTrait);\n\nvar Bar = (function (_super, FooTrait) {\n    function Bar() { }\n    Bar.prototype.tfoo = FooTrait.prototype.foo;\n    Bar.prototype.tbar = FooTrait.prototype.bar;\n    return Bar;\n})(undefined, FooTrait);\n```\n\nUnresolved name conflicts should raise a compile time error.\n\nI think it would be a great advance for the language. But the proposal has more than one year made (in codeplex) ​​and has not yet been implemented.\n","author":{"url":"https://github.com/yasselavila","@type":"Person","name":"yasselavila"},"datePublished":"2014-07-30T15:27:49Z","url":"https://github.com/microsoft/TypeScript/issues/311"}

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:d1d2793e-a162-bd13-d187-2b7540b39237
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEAFA:65478:6AFFF0:903FBB:6B00D72E
html-safe-nonce6da464133d9a66cb1abd65f3c93a384438b17cea1399b8370d7434b77cece10e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUZBOjY1NDc4OjZBRkZGMDo5MDNGQkI6NkIwMEQ3MkUiLCJ2aXNpdG9yX2lkIjoiNzU4MzkxNDE5MDYyMDkwNzMxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac771d465e874700303b80d1e63e5a1a78dc5efecc5aa8ecba1643c0c8e250576e
hovercard-subject-tagissue:39104093
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/311/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f5cacf29bfd6b179d91b0ed1ceb8b4d90d9698b90f3c19ac811c4a7c253f9517/microsoft/TypeScript/issues/311
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f5cacf29bfd6b179d91b0ed1ceb8b4d90d9698b90f3c19ac811c4a7c253f9517/microsoft/TypeScript/issues/311
og:image:altORIGINALLY PROPOSED IN http://typescript.codeplex.com/workitem/838 Traits, as "compile-time" partial classes, would perfectly fit with TS ideology and resolve problems of multiple inheritance/mixin...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameyasselavila
hostnamegithub.com
expected-hostnamegithub.com
Nonea481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b
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
release84c8c5cc25e2fb7f2308428458538436baecc6d2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/311#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F311
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%2F311
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/311
Reloadhttps://github.com/microsoft/TypeScript/issues/311
Reloadhttps://github.com/microsoft/TypeScript/issues/311
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/311
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/311
Feature Request / Proposal: Traitshttps://github.com/microsoft/TypeScript/issues/311#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/yasselavila
Yassel Avila (yasselavila)https://github.com/yasselavila
on Jul 30, 2014https://github.com/microsoft/TypeScript/issues/311#issue-39104093
http://typescript.codeplex.com/workitem/838http://typescript.codeplex.com/workitem/838
http://en.wikibooks.org/wiki/Scala/Traitshttp://en.wikibooks.org/wiki/Scala/Traits
http://php.net/traithttp://php.net/trait
Nexthttps://github.com/microsoft/TypeScript/issues/311?timeline_page=1
https://github.com/ComFreek
ComFreek (ComFreek)https://github.com/ComFreek
on Jul 30, 2014https://github.com/microsoft/TypeScript/issues/311#issuecomment-50632340
Mixinshttp://www.typescriptlang.org/Handbook#mixins
https://github.com/yasselavila
Yassel Avila (yasselavila)https://github.com/yasselavila
on Jul 30, 2014https://github.com/microsoft/TypeScript/issues/311#issuecomment-50633790
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Suggestionhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
on Jul 30, 2014https://github.com/microsoft/TypeScript/issues/311#event-147326741
https://github.com/kamranayub
Kamran Ayub (kamranayub)https://github.com/kamranayub
on Sep 26, 2014https://github.com/microsoft/TypeScript/issues/311#issuecomment-56995837
https://github.com/jbman
Johannes Bergmann (jbman)https://github.com/jbman
on Oct 4, 2014https://github.com/microsoft/TypeScript/issues/311#issuecomment-57920939
http://en.wikipedia.org/wiki/Data,_context_and_interactionhttp://en.wikipedia.org/wiki/Data,_context_and_interaction
Yassel Avila (@yasselavila)https://github.com/yasselavila
#805https://github.com/microsoft/TypeScript/issues/805
https://github.com/anatoliyarkhipov
Anatoliy Arkhipov (anatoliyarkhipov)https://github.com/anatoliyarkhipov
on Nov 1, 2014https://github.com/microsoft/TypeScript/issues/311#issuecomment-61367904
https://github.com/csnover
Colin Snover (csnover)https://github.com/csnover
on Feb 26, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-76108309
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on Feb 27, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-76314103
https://github.com/csnover
Colin Snover (csnover)https://github.com/csnover
on Feb 27, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-76318253
no chance to accept thishttps://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-features
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
https://github.com/csnover
Colin Snover (csnover)https://github.com/csnover
on Feb 28, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-76506971
Jon (@jbondc)https://github.com/jbondc
https://github.com/NoelAbrahams
Noel Abrahams (NoelAbrahams)https://github.com/NoelAbrahams
on Mar 1, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-76591663
Jon (@jbondc)https://github.com/jbondc
similar proposal on the old codeplex sitehttps://typescript.codeplex.com/discussions/406449
https://github.com/csnover
Colin Snover (csnover)https://github.com/csnover
on Mar 13, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-78766241
https://github.com/csnover
Colin Snover (csnover)https://github.com/csnover
on Mar 16, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-81882943
https://docs.google.com/a/sitepen.com/document/d/112Xw-t8eh-eFIdKhn7LeDbGhO86XwlKv-Fwc6j9U-Oc/edithttps://docs.google.com/a/sitepen.com/document/d/112Xw-t8eh-eFIdKhn7LeDbGhO86XwlKv-Fwc6j9U-Oc/edit
https://github.com/yasselavila
Yassel Avila (yasselavila)https://github.com/yasselavila
on Mar 16, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-81906851
Colin Snover (@csnover)https://github.com/csnover
https://github.com/anatoliyarkhipov
Anatoliy Arkhipov (anatoliyarkhipov)https://github.com/anatoliyarkhipov
on Apr 10, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-91541047
Jon (@jbondc)https://github.com/jbondc
Colin Snover (@csnover)https://github.com/csnover
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
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Apr 27, 2015https://github.com/microsoft/TypeScript/issues/311#event-291453059
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 28, 2015https://github.com/microsoft/TypeScript/issues/311#issuecomment-96854042
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 28, 2015https://github.com/microsoft/TypeScript/issues/311#event-291454080
https://github.com/zakhenry
Zak Henry (zakhenry)https://github.com/zakhenry
on Jan 22, 2016https://github.com/microsoft/TypeScript/issues/311#issuecomment-173888220
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Jan 22, 2016https://github.com/microsoft/TypeScript/issues/311#issuecomment-173892433
https://github.com/zakhenry
Zak Henry (zakhenry)https://github.com/zakhenry
on Jan 22, 2016https://github.com/microsoft/TypeScript/issues/311#issuecomment-173893262
Kitson Kelly (@kitsonk)https://github.com/kitsonk
https://github.com/sanex3339
Timofey Kachalov (sanex3339)https://github.com/sanex3339
on Jan 24, 2017https://github.com/microsoft/TypeScript/issues/311#issuecomment-274850172
https://github.com/ackimwilliams
ackim williams (ackimwilliams)https://github.com/ackimwilliams
on Feb 21, 2017https://github.com/microsoft/TypeScript/issues/311#issuecomment-281268320
https://github.com/dylans
Dylan Schiemann (dylans)https://github.com/dylans
on Feb 22, 2017https://github.com/microsoft/TypeScript/issues/311#issuecomment-281669918
https://blogs.msdn.microsoft.com/typescript/2017/02/02/announcing-typescript-2-2-rc/https://blogs.msdn.microsoft.com/typescript/2017/02/02/announcing-typescript-2-2-rc/
https://github.com/alexeygolev
Alexey Golev (alexeygolev)https://github.com/alexeygolev
on Mar 7, 2017https://github.com/microsoft/TypeScript/issues/311#issuecomment-284644910
Johannes Bergmann (@jbman)https://github.com/jbman
https://github.com/samfrances
Sam Frances (samfrances)https://github.com/samfrances
on Jul 28, 2017https://github.com/microsoft/TypeScript/issues/311#issuecomment-318631024
https://github.com/michaelolof
Michael Olofinjana (michaelolof)https://github.com/michaelolof
on Nov 4, 2017https://github.com/microsoft/TypeScript/issues/311#issuecomment-341888664
TypeScript Mixhttps://github.com/michaelolof/typescript-mix
microsofthttps://github.com/microsoft
on Jun 18, 2018https://github.com/microsoft/TypeScript/issues/311#event-1686903720
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/311
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/311
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.