forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsurf.d.ts
More file actions
29 lines (23 loc) · 703 Bytes
/
csurf.d.ts
File metadata and controls
29 lines (23 loc) · 703 Bytes
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
// Type definitions for csurf
// 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;
}): express.RequestHandler;
namespace csurf {
export interface CookieOptions extends express.CookieOptions {
key: string;
}
}
export = csurf;
}