Skip to content
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

instanceof check with multiple mixins #9

Closed
allmarkedup opened this issue May 10, 2016 · 1 comment
Closed

instanceof check with multiple mixins #9

allmarkedup opened this issue May 10, 2016 · 1 comment

Comments

@allmarkedup
Copy link

Hi - I'm just exploring this way of implementing mixins and I'm really liking it. However one thing that I've noticed is that the instanceofcheck doesn't work as I expected when using multiple mixins when doing something like:

class D extends mix(A).with(B, C)

In this case D instanceof B will be true, however D instanceof C will be false.

Is there any way to work around this? Or have I misunderstood how the @@ hasInstance support is supposed to work?

@justinfagnani
Copy link
Owner

@@hasInstance support isn't very available yet. In the meantime I've added the function hasMixin(obj, mixin).

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

No branches or pull requests

2 participants