Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Is it possible to extend methods with static ES6 class methods ? #181

Open
hlandao opened this issue Jun 6, 2017 · 3 comments
Open

Is it possible to extend methods with static ES6 class methods ? #181

hlandao opened this issue Jun 6, 2017 · 3 comments
Labels

Comments

@hlandao
Copy link

hlandao commented Jun 6, 2017

It is not clear from docs and will work in theory.
Are there any consequences I should worry about ?

@vadimdemedes
Copy link
Owner

Could you explain what's troubling to understand in this example, so that I could improve it? https://github.com/vadimdemedes/mongorito#extending-model-with-new-methods

As soon as you don't overwrite native methods, I don't think there are any bad consequences.

@zaaack
Copy link
Contributor

zaaack commented Jun 7, 2017

@vadimdemedes I think the point is the plugin usage in docs doesn't show the truly power of plugin, since we can easily extend model method and static method with ES6 class inherit.

@chaoyangnz
Copy link

+1 the same confusion. What are things plugins can do but inherited class cannot do?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants