Installation
npm install --save @types/koa2-session-redis
Summary
This package contains type definitions for koa2-session-redis (https://github.com/lonord/koa2-session-redis).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa2-session-redis.
index.d.ts
import * as session from "koa-session";
import * as Redis from "redis";
export = RedisStore;
declare class RedisStore implements session.stores {
constructor(config?: Redis.ClientOpts);
/**
* get session object by key
*/
get(key: string): any;
/**
* set session object for key, with a maxAge (in ms)
*/
set(
key: string,
sess: Partial<session.Session> & { _expire?: number | undefined; _maxAge?: number | undefined },
maxAge: session.opts["maxAge"],
): any;
/**
* destroy session for key
*/
destroy(key: string): any;
/**
* sends the quit command to the redis server and ends cleanly right after all running commands were properly handled
*/
quit(): void;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:38 GMT
- Dependencies: @types/koa-session, @types/redis
Credits
These definitions were written by Dima Mukhin.