TypeScriptBuilder icon indicating copy to clipboard operation
TypeScriptBuilder copied to clipboard

DateTime to TS-Date

Open enkelmedia opened this issue 4 years ago • 0 comments

Hi!

I'm not sure who others are using this library but I'm sending my data with .NET Core WebAPI. A C# DateTime will be serialized to a string in the json-payload so the "Date"-type in the TS-typings does not make sence in my case.

Since the typing's generates says that the field is a Date and can't use new Date(myProperty) since the Date-constructor expects a string.

I'm wondering if DateTime should be typed as a string? Or how does other handle this?

enkelmedia avatar Feb 12 '21 10:02 enkelmedia