Coalesce icon indicating copy to clipboard operation
Coalesce copied to clipboard

[Proposal] Treat non-double-safe numerics as strings in TS.

Open ascott18 opened this issue 6 years ago • 1 comments

This may also include treating them as strings in the generated DTOs to avoid possible munging by the JSON serializer.

C# types decimal, int64, and uint64 can't be safely represented in JS. Usually when these types are used, there's a good reason for their usage - the values typically are large enough that these types or needed, or the precision characteristics of decimal are needed.

Widespread adoption of JS BigInt will solve int64 and uint64, but not decimal. These types will still need to be transported as strings in JSON, too.

ascott18 avatar Jul 29 '18 23:07 ascott18

This would cause lots of pain and consternation on the client and I think we are best to wait for some kind of support in JS to make the move.

GrantErickson avatar Jul 29 '20 23:07 GrantErickson