Skip to content

Commit

Permalink
Merge pull request #135 from mgcrea/fix-typings
Browse files Browse the repository at this point in the history
chore(types): add MemoryStore types
  • Loading branch information
SerayaEryn authored Nov 12, 2020
2 parents 4fd38d1 + 4ef7b24 commit e201f78
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 e201f78

Please sign in to comment.