3.0.11 • Published 6 months ago
@types/koa-session-minimal v3.0.11
Installation
npm install --save @types/koa-session-minimal
Summary
This package contains type definitions for koa-session-minimal (https://github.com/longztian/koa-session-minimal).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-session-minimal.
index.d.ts
// Type definitions for koa-session-minimal v3.x
// Project: https://github.com/longztian/koa-session-minimal
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/* =================== USAGE ===================
import * as Koa from "koa";
import session = require("koa-session-minimal");
const app = new Koa();
app.use(session());
=============================================== */
import * as Koa from "koa";
import * as cookies from "cookies";
declare module "koa" {
interface Context {
session: any;
sessionHandler: { regenerateId: () => void };
}
}
declare function session(opts?: {
/**
* session cookie name and store key prefix. Default is 'koa:sess'
*/
key?: string | undefined;
/**
* cookie options
*/
cookie?: cookies.IOptions | { (ctx?: Koa.Context): cookies.IOptions } | undefined;
/**
* session store
*/
store?: any;
}): Koa.Middleware;
declare namespace session {}
export = session;
Additional Details
- Last updated: Thu, 23 Dec 2021 23:35:00 GMT
- Dependencies: @types/koa, @types/cookies
- Global values: none
Credits
These definitions were written by DefinitelyTyped.