DefinitelyTyped/types/koa-cookie/index.d.ts
John Hou c16fefbe65 Add typings for the package 'koa-cookie' (#41714)
* Add typings for the package koa-cookie

* format with 4 spaces
2020-01-20 18:56:23 -05:00

28 lines
661 B
TypeScript

// Type definitions for koa-cookie 1.0
// Project: https://github.com/varunpal/koa-cookie
// Definitions by: John Hou <https://github.com/dancon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/* =================== USAGE ===================
import cookie = require("koa-cookie");
import Koa = require('koa');
const app = new Koa();
app.use(cookie());
=============================================== */
import { Middleware } from 'koa';
declare module 'koa' {
interface BaseContext {
cookie: Record<string, any>;
}
}
declare function cookie(): Middleware;
export = cookie;