-
Notifications
You must be signed in to change notification settings - Fork 103
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
Refs and props #60
Refs and props #60
Conversation
|
||
function cloneAndExtend(fixed, extensionFunction, args) { | ||
args = arguments.length > 3 ? slice(arguments, 2, arguments.length) : args; | ||
var stamp = stampit(fixed.methods, fixed.state, fixed.enclose); | ||
var stamp = stampit(fixed.methods, fixed.refs, fixed.enclose, fixed.props); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also support composing with legacy stamps that have fixed.state
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me add a unit test on that. It's better to be as backwards compatible as possible.
I've just addressed the stampit@1.1 compatibility. See the PR please. |
@@ -3909,8 +3933,9 @@ function isStamp(obj) { | |||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will return false for legacy stamps.
Fixed the mentioned issues. Thanks Eric. |
state
renamed torefs
. New aliasedfixed.state
andstate()
were added forstamp.fixed.refs
andstamp.refs()
.Added
stamp.fixed.props
,stamp.props()
and fourth parameter to thestampit()
function.