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

(v3.x) Allow custom Context Config types for hooks' request properties #3787

Merged
merged 2 commits into from Mar 21, 2022

Conversation

sumbad
Copy link
Contributor

@sumbad sumbad commented Mar 21, 2022

This PR is based on #3786 for v3.x.

By now, hooks use default Context Config for the request property. This PR implies using a custom Context Config for request in a hook if it was sent (repeats the same logic as for reply).

Checklist

@github-actions github-actions bot added the typescript TypeScript related label Mar 21, 2022
@Eomm
Copy link
Member

Eomm commented Mar 21, 2022

Would you mind to add a test here?

@sumbad
Copy link
Contributor Author

sumbad commented Mar 21, 2022

Yes, sure. I've added tsd tests to test/types/hooks.test-d.ts.

@sumbad sumbad changed the title (v3.x) Allow custom Context Config types for hooks' request properties (v3.x) Allow custom Context Config types for hooks' request properties Mar 21, 2022
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 f00f2a2 into fastify:v3.x Mar 21, 2022
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
typescript TypeScript related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants