Skip to content
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

feat: add an overload function to parse #95

Merged
merged 2 commits into from
Apr 7, 2023
Merged

Conversation

timursaurus
Copy link
Contributor

@timursaurus timursaurus commented Apr 5, 2023

Added an overload function type to parse which provides a better developer experience and makes typescript happy
By adding an overload, we don't have to use @ts-expect-error flag, when only 2 arguments are passed to parse like in this example

Checklist

Signed-off-by: Timur Bolotov <[email protected]>
Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind to add a test?

@timursaurus
Copy link
Contributor Author

timursaurus commented Apr 6, 2023

Would you mind to add a test?

Sure
I think rewriting some of the test would also be beneficial, as there's no need to pass null to reviver in type tests now

Signed-off-by: Timur Bolotov <[email protected]>
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 97e3fd1 into fastify:master Apr 7, 2023
@Eomm
Copy link
Member

Eomm commented Apr 8, 2023

I can't release it due to permission

@timursaurus timursaurus deleted the dev branch September 29, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants