Replies: 1 comment 3 replies
-
Yeah, sorry about that. Those transforms were making the typings slower/harder to reason about and they didn't work in many cases (e.g. a set of dates, etc.). For now I recommend you to switch to a getter/setter: class M extends Model({ timestamp: prop<number>() }) {
get date() {
return new Date(this.timestamp)
}
@modelAction
setDate(date: Date) {
this.timestamp = +date;
}
}
const m = new M({
timestamp: +(new Date())
}) I know it is typing a bit more, but it shouldn't be that bad |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to upgrade mobx-keystone. It looks like some of the properties mappers have been removed. What do you recommend I use instead of
prop_dateString
?Beta Was this translation helpful? Give feedback.
All reactions