amtrak icon indicating copy to clipboard operation
amtrak copied to clipboard

Fixes some type issues, there are probably more so I'll make another PR soon

Open eiiot opened this issue 2 years ago • 7 comments

eiiot avatar Apr 07 '22 05:04 eiiot

I put a lot of time and effort into this PR

eiiot avatar Apr 07 '22 05:04 eiiot

I also fixed FetchAllTrains, it returns { [key: number]: trainData[] } not trainData[]

eiiot avatar Apr 07 '22 21:04 eiiot

TBH the solution to the dates shouldn't be to change the type to a string, but to ensure it is a Date before being returned.

piemadd avatar Apr 08 '22 01:04 piemadd

I've found that new Date doesn't really like this format for some reason, though

eiiot avatar Apr 08 '22 04:04 eiiot

What does passing the string create? It's ISO-8061

On Thu, Apr 7, 2022, 23:43 Eliot Hertenstein @.***> wrote:

I've found that new Date doesn't really like this format for some reason, though

— Reply to this email directly, view it on GitHub https://github.com/piemadd/amtrak/pull/5#issuecomment-1092436347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOJ3UGY32UK3KUPRA4HAJLVD62N3ANCNFSM5SYGSO4A . You are receiving this because you commented.Message ID: @.***>

piemadd avatar Apr 08 '22 04:04 piemadd

Wait that was an error w/ another api nevermind :)

eiiot avatar Apr 08 '22 06:04 eiiot

mf

piemadd avatar Apr 08 '22 18:04 piemadd