# @types/koa-session-minimal

> TypeScript definitions for koa-session-minimal

Latest version **3.0.12** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/koa-session-minimal
pnpm add @types/koa-session-minimal
yarn add @types/koa-session-minimal
bun add @types/koa-session-minimal
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.12 |
| Published | 2025-10-24 |
| First published | 2016-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/koa-session-minimal
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-session-minimal
- npm.io page: https://npm.io/package/@types/koa-session-minimal

## Dependencies (2)

- [@types/koa](https://npm.io/package/@types/koa.md) *
- [@types/cookies](https://npm.io/package/@types/cookies.md) *

## Recent versions

- 3.0.12 (latest) — 2025-10-24
- 3.0.11 (ts4.6) — 2023-11-07
- 3.0.8 (ts4.2) — 2021-12-24
- 3.0.7 (ts3.6) — 2021-07-09
- 3.0.5 (ts3.0) — 2017-11-09
- 3.0.4 (ts2.1) — 2017-02-21
- 3.0.10 — 2023-10-18
- 3.0.9 — 2023-09-14
- 3.0.6 — 2021-07-08
- 3.0.3 — 2016-12-19
- 3.0.2 — 2016-11-04
- 3.0.1 — 2016-10-26

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-session-minimal/index.d.ts)
````ts
/* =================== USAGE ===================

    import Koa = require("koa");
    import session = require("koa-session-minimal");

    const app = new Koa();
    app.use(session());

 =============================================== */

import cookies = require("cookies");
import * as Koa from "koa";

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: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/cookies](https://npmjs.com/package/@types/cookies), [@types/koa](https://npmjs.com/package/@types/koa)

# Credits
These definitions were written by .

---
_Source: https://npm.io/package/@types/koa-session-minimal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
