-
Notifications
You must be signed in to change notification settings - Fork 51
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
Type definition of callback arguments for SessionStore.get
#158
Comments
A PR is welcome. Dont forget to also adding typings tests. It is planned to publish on friday a new version. |
Released in v10 Line 84 in 16ef7eb
|
I think what he wants ie that CallbackSession needs to have FastifySession and null as second param |
Thanks.
Yes. And omit unnessary methods or properties. Like this // Note: I am not sure if the cookie property is necessary.
type UnnessaryRestoreSessionKeys = 'touch' | 'regenerate' | 'destroy' | 'reload' | 'save' | 'set' | 'get' | 'isModified' | 'cookie';
type CallbackSession = (err: Error | null, result: Omit<Fastify.Session, UnnessaryRestoreSessionKeys> | null) => void; |
+1 for this. |
Can you provide a PR? |
Prerequisites
🚀 Feature Proposal
null
orundefined
.Probably only
sessionId
,encryptedSessionId
and user-defined values are needed for the result value.Currently, I have to do the following, but I feel it is because the original type definition is bad.
Motivation
No response
Example
No response
The text was updated successfully, but these errors were encountered: