-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
not sure if there's a way to do this or not, looking at the code so far I think not...
but I want to be able to say something like:
Factory.define('event', Actions, {
end () {
if (!this.start || !this.duration) {
throw new Error('must provide start and duration if end not specified')
}
return new Date(+this.start + this.duration)
},
})
That would allow me to optionally provide start and duration. I notice that this
object contains the statically defined properties, but not what the user provides as arguments to Factory.create
Any tips on how to implement that?
Metadata
Metadata
Assignees
Labels
No labels