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

Updated cookies.md with register signature #2848

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

fedotarte
Copy link
Contributor

@fedotarte fedotarte commented Sep 5, 2023

at 9.0.4 we should return a callback, or we've got a ts error:

TS2345: Argument of type 'typeof fastifyCookie' is not assignable to parameter of type 'FastifyPluginCallback | FastifyPluginAsync | Promise{ default: FastifyPluginCallback ; }> | Promise...>'.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Docs
  • Other... Please describe:

What is the current behavior?

for @nestjs/platform-fastify 10.0.2 and fastify/cookies 9.0.4 we should return a callback inside register, or we've got a ts error:

TS2345: Argument of type 'typeof fastifyCookie' is not assignable to parameter of type 'FastifyPluginCallback | FastifyPluginAsync | Promise{ default: FastifyPluginCallback ; }> | Promise...>'.

Issue Number: N/A

What is the new behavior?

it's about register cookies plugin for nest fastify plattform

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

at 9.0.4 we should return a callback, or we've got a ts error:

TS2345: Argument of type 'typeof fastifyCookie' is not assignable to parameter of type 'FastifyPluginCallback  | FastifyPluginAsync  | Promise{ default: FastifyPluginCallback ; }> | Promise...>'.
@kamilmysliwiec kamilmysliwiec merged commit 303fffa into nestjs:master Sep 11, 2023
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.

2 participants