Replies: 1 comment
-
Hey @dawidcxx! What about creating a wrapper type in your codebase instead? type DineroSnapshotNumber = DineroSnapshot<number> Dinero.js indeed provides a number implementation, but I don't think this choice should be reflected at the abstraction level. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since the default dinero instance is of type
Dinero<number>
(and I think that is a sensible default). It would perhaps also make sense to default the generic paramTAmount
in https://github.com/dinerojs/dinero.js/blob/main/packages/core/src/types/DineroSnapshot.ts tonumber
. EssentiallyThe reason why I propose this change is that writing
DineroSnapshot<number>
within my DTO/model declarations make seem more complicated/repetitive than it needs to be.Beta Was this translation helpful? Give feedback.
All reactions