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

session.options() type is missing from FastifySessionObject in types.d.ts #279

Open
2 tasks done
CamParry opened this issue Nov 30, 2024 · 2 comments
Open
2 tasks done

Comments

@CamParry
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

5.1.0

Plugin version

11.0.1

Node.js version

20.11.0

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

14.6.1

Description

I noticed that the session.options() method on line 59 of session.js is missing a type definition on the FastifySessionObject interface in the types.d.ts file, is this something that could be added? I'm happy to submit a PR if need be.

Link to code that reproduces the bug

No response

Expected Behavior

session.options() method should be correctly typed

@CamParry
Copy link
Author

Also, I'm not sure if the correct type should be options(opts: Partial<Fastify.Session['cookie']>): void or options(opts: Partial<CookieOptions>): void?

@mcollina
Copy link
Member

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests. We use tsd for types.

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

No branches or pull requests

2 participants