Closed jpmoral closed 9 years ago
@adomokos
I discovered this a couple of weeks ago. I was able to eliminate the need for subclassing by going with a different (cleaner) design of Action and Context hash so I'm not sure how useful this is.
However, I made the PR because it might be surprising to others that expects
and promises
don't work with inheritance.
@jpmoral, thank you for submitting this PR.
The reason I opted to use class methods for the actions was to limit inheritance. With inheritance there is an "inferred" state that I tried to avoid.
Would you be OK if I did not merge this PR? I know you worked on it, that's why I feel bad about it.
@adomokos
It's no problem, like I mentioned, even I'm a bit iffy about it. It might be helpful though to be explicit in the docs that inheritance of actions isn't really encouraged.
Good suggestion!
Currently when an
Action
is subclassed the subclass cannot access the expected and promised keys using dot notation.This PR will allow the above to work.