Open rktyt opened 1 year ago
A PR is welcome. Dont forget to also adding typings tests.
It is planned to publish on friday a new version.
I think what he wants ie that CallbackSession needs to have FastifySession and null as second param
Thanks.
I think what he wants ie that CallbackSession needs to have FastifySession and null as second param
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.
@kgoedecke
Can you provide a PR?
Prerequisites
π Feature Proposal
null
orundefined
.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