Aydrian Howard
07/06/2022, 2:23 PMnew Int.NumberFormat(...).format()
and it takes a number. It looks like I should be able to do .toNumber()
on the Decimal type to get it as a number, but I get an error that it's not a function. If I do .toString()
that works but TypeScript is unhappy. Here is my code:
{new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD"
}).format(product.price.toString())}
Has anyone ran into something like this using the Decimal type?nikolasburk
Aydrian Howard
07/06/2022, 2:29 PMAydrian Howard
07/06/2022, 2:55 PMNumber(item.product.price.toString())
Aladin
07/07/2022, 2:10 AM+