From 4ef7b24cc174889dbe08ae6dacfd0f24cfe17ca2 Mon Sep 17 00:00:00 2001 From: Olivier Louvignes Date: Wed, 11 Nov 2020 19:14:52 +0100 Subject: [PATCH] chore(types): add MemoryStore types --- types/types.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/types/types.d.ts b/types/types.d.ts index 29f81ab..aef6c3b 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -84,6 +84,15 @@ declare namespace FastifySessionPlugin { } } +export class MemoryStore implements FastifySessionPlugin.SessionStore { + set(sessionId: string, session: any, callback: (err?: Error) => void): void; + get( + sessionId: string, + callback: (err?: Error, session?: any) => void + ): void; + destroy(sessionId: string, callback: (err?: Error) => void): void; +} + declare const FastifySessionPlugin: FastifyPlugin; export default FastifySessionPlugin;