-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert date to string #77
Conversation
code: 100, | ||
} | ||
|
||
const output: TestExpectedType = convertDateFieldsToIsoString(input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to do explicit type here? is it meant as a assert-like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function is automatically inferring the type.
yes, it is like an assert to make sure the type is being inferred correctly
Changes
Adding
convertDatesToIsoString
to transform an input object withDate
members into an object with the correspondingDate
members replaced by their ISO string representation. This transformation is done recursively, covering nested objects as well.Checklist
major
,minor
,patch
orskip-release