UNPKG

hono-sess

Version:

A Simple Session Middleware for Hono

31 lines 1.1 kB
/*! * hono-sess * Copyright(c) 2010 Sencha Inc. * Copyright(c) 2011 TJ Holowaychuk * Copyright(c) 2015 Douglas Christopher Wilson * Copyright(c) 2025 Mehmet Güleryüz * MIT Licensed */ import { Store } from './store'; import type { ExtendedHonoRequest, SessionData } from './types'; /** * A session store in memory. * @public */ export declare class MemoryStore extends Store { sessions: { [key: string]: string; }; constructor(); all(callback?: (err: any, sessions: { [key: string]: SessionData; }) => void): void; clear(callback?: (err?: any) => void): void; destroy(sessionId: string, callback?: (err?: any) => void): void; get(sessionId: string, callback: (err: any, session?: SessionData) => void): void; set(sessionId: string, session: SessionData, callback?: (err?: any) => void): void; length(callback: (err: any, length?: number) => void): void; touch(sessionId: string, session: SessionData, callback?: (err?: any) => void): void; generate(req: ExtendedHonoRequest): void; } //# sourceMappingURL=memory.d.ts.map