Closed mheavenor closed 2 years ago
Thanks for opening this issue @mheavenor, we're taking a look and will post an update once we have one.
@mheavenor thanks for your patience! You're correct as it's a typing mismatch, however because replacing number
with Date
entirely would result in a breaking change, for now we're going to set the type as a union of those two types and will be released in the next update. Once v7.0 drops (in the works) we will ensure that this attribute will be corrected to just Date
. Sorry for the inconvenience, and thanks for bringing this to our attention!
Edit: After further testing, it always deserializes to Date
and never to number
so it's inherently broken, the change now will remove number
as the type and replace it with Date
Describe the bug
The typing of the
originalStartTime
property on theEvent
model is typed as a number. The value, however, is an instance of a Date object.To Reproduce
Expected behavior The typing for
originalStartTime
should beDate
as that is what the value isSDK Version: 6.4.1 The codebase seems to still type
originalStartTime
as a number as specified here: https://github.com/nylas/nylas-nodejs/blob/main/src/models/event.ts#L77