forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
csurf.d.ts
31 lines (25 loc) · 764 Bytes
/
csurf.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Type definitions for csurf 1.9.0
// Project: https://www.npmjs.org/package/csurf
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare namespace Express {
export interface Request {
csrfToken(): string;
}
}
declare module "csurf" {
import express = require('express');
function csurf(options?: {
value?: (req: express.Request) => string;
cookie?: csurf.CookieOptions | boolean;
ignoreMethods?: string[];
sessionKey?: string;
}): express.RequestHandler;
namespace csurf {
export interface CookieOptions extends express.CookieOptions {
key: string;
}
}
export = csurf;
}