Open web-shenjin opened 7 months ago
Try putting the following line above your code:
declare function Decimal(n: string | number | Decimal): Decimal;
Does that work? It's been a while since I've used typescript.
Or just change the code to:
settlementNumber = new Decimal(settlementNumber).add(v.settlementNumber).toNumber();
Same issue as #216. The decimal.d.ts file needs to be amended to support calling Decimal
without using new
.
The decimal.d.ts file needs to be amended to support calling Decimal without using new.
Actually why is it even allowed to call it as a function, without new
? Now it's probably just backwards compatibility, but what was the use case at first?
please how resolve?