aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/amounts.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-10-22 13:50:34 -0300
committerSebastian <sebasjm@gmail.com>2023-10-22 13:50:34 -0300
commit2005273d1286819e68d3ea7a3290f8c357be5e40 (patch)
tree7808cc079800361c6fced024dc90c823a7a539d6 /packages/taler-util/src/amounts.ts
parent2ac73949e7cb8de44e56f2fecae617efab15671e (diff)
downloadwallet-core-2005273d1286819e68d3ea7a3290f8c357be5e40.tar.xz
add codecAmountString for string field that are just amount, note that this does not add the validation so is just type checking for future validation
Diffstat (limited to 'packages/taler-util/src/amounts.ts')
-rw-r--r--packages/taler-util/src/amounts.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/taler-util/src/amounts.ts b/packages/taler-util/src/amounts.ts
index 04343b8e9..ee35a6bbe 100644
--- a/packages/taler-util/src/amounts.ts
+++ b/packages/taler-util/src/amounts.ts
@@ -74,7 +74,7 @@ export const codecForAmountJson = (): Codec<AmountJson> =>
.property("fraction", codecForNumber())
.build("AmountJson");
-export const codecForAmountString = (): Codec<AmountString> => codecForString();
+export const codecForAmountString = (): Codec<AmountString> => codecForAmountString();
/**
* Result of a possibly overflowing operation.
@@ -93,7 +93,7 @@ export interface Result {
/**
* Type for things that are treated like amounts.
*/
-export type AmountLike = AmountString | AmountJson;
+export type AmountLike = string | AmountString | AmountJson;
export interface DivmodResult {
quotient: number;