Skip to content

Commit

Permalink
chore(types): add MemoryStore types
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Nov 11, 2020
1 parent 4fd38d1 commit 4ef7b24
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<FastifySessionPlugin.Options>;

export default FastifySessionPlugin;

0 comments on commit 4ef7b24

Please sign in to comment.