piemadd / amtrak

NPM library to get Amtrak tracking data.
GNU Affero General Public License v3.0
49 stars 4 forks source link

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

Open eiiot opened 2 years ago

eiiot commented 2 years ago

I put a lot of time and effort into this PR

eiiot commented 2 years ago

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

piemadd commented 2 years ago

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.

eiiot commented 2 years ago

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

piemadd commented 2 years ago

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: @.***>

eiiot commented 2 years ago

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

piemadd commented 2 years ago

mf