If my schema has a Decimal field, and I am publish...
# orm-help
t
If my schema has a Decimal field, and I am publishing it via an API (the decimal serializes to a string) how do I ensure my react app (typescript) deserializes the json to an object with the Decimal property?
r
@Tyler Clendenin 👋 I think you would need to parse the value to a float wherever you have to use this.
t
ok, i think it might be useful if the Decimal type could be (in the schema, declaratively) treated as if t was a string. though I don't know enough about TS to know if that won't work
r
We use the Decimal.js library under the hood for Decimals so it’s not a string but an instance of the Decimal type.