-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow mixins to seamlessly override existing methods #304
Comments
Good point! For example: const mixin = {
types: ['Doc'],
init(args) {},
methods: {
method1(baseFn, arg1, arg2) {
if (baseFn) {
// base function exists (overrides existing method)
} else {
// no base function (extends the generated api)
}
}
} Is this something that would work for you? |
Hi @marcusoffesson, |
Hi @konne! |
Hi @marcusoffesson, |
If I add a mixin I have no chance to make something like an "inserOrUpdate".
It would be great to have a section there I can add function and enigma gives me
as a parameter if this function exists or not.
So that I can decide in my mixin what to do.
For example. We develop an mixin like #272 and a later engine version delivers even on .app an getProperties.
With the current enigma.js we have no chance to write a generic working mixin.
The text was updated successfully, but these errors were encountered: