Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

String fields representing dates #4

Open
richorama opened this issue Nov 18, 2020 · 0 comments
Open

String fields representing dates #4

richorama opened this issue Nov 18, 2020 · 0 comments

Comments

@richorama
Copy link

richorama commented Nov 18, 2020

RE: http://json2ts.com/

Hi! I love your project and I use it regularly. Thanks for the time you've spent building it.

I have an issue whereby string fields that contain date information are being recognised as dates. i.e.

{
   "Example": "2020-03-10T12:03:35.6564158Z"
}

gives this output:

declare module namespace {

    export interface RootObject {
        Example: Date;
    }

}

I don't think this is correct. JSON doesn't have a date type, and the underlying field remains a string at runtime.

It's fine, as I can correct this. I'm happy to raise a PR for this if you're willing to accept?

Also I notice that the email/feedback links don't work. Maybe a link to GitHub would be useful ;¬P

@richorama

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant