Coalesce
Coalesce copied to clipboard
[Proposal] Treat non-double-safe numerics as strings in TS.
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.
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.