0.0.6 • Published 2 years ago

@types/koa2-session-redis v0.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for koa2-session-redis 0.0
// Project: https://github.com/lonord/koa2-session-redis
// Definitions by: Dima Mukhin <https://github.com/DimaMukhin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as Redis from 'redis';
import * as session from 'koa-session';

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

Credits

These definitions were written by Dima Mukhin.

0.0.5

2 years ago

0.0.4

2 years ago

0.0.6

2 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

6 years ago

0.0.0

7 years ago