While adding the stringToBigIntTransform prop transform, I found it not very intuitive to give the prop the encoded type (e.g. string) and then apply a prop transform to get the desired type (e.g. bigint). Instead, I think the opposite order would be more intuitive, e.g.:
@model("M")
class M extends Model({
int: prop<bigint>().withTransform(bigintToStringTransform()),
date: prop<Date>().withTransform(dateToTimestampTransform()),
// ...
}) {
// ...
}
What do you think?
While adding the
stringToBigIntTransformprop transform, I found it not very intuitive to give the prop the encoded type (e.g.string) and then apply a prop transform to get the desired type (e.g.bigint). Instead, I think the opposite order would be more intuitive, e.g.:What do you think?