solve precision varriance

This commit is contained in:
Ulf Gebhardt 2022-02-27 04:53:29 +01:00
parent 64c01e8fee
commit 1dd692397b
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -1,6 +1,11 @@
import Decimal from 'decimal.js-light'
import { ValueTransformer } from 'typeorm'
Decimal.set({
precision: 25,
rounding: Decimal.ROUND_HALF_UP,
})
export const DecimalTransformer: ValueTransformer = {
/**
* Used to marshal Decimal when writing to the database.