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
30 lines (23 loc) · 684 Bytes
/
csurf.d.ts
File metadata and controls
30 lines (23 loc) · 684 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/borisyankov/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare module Express {
export interface Request {
csrfToken(): string;
}
}
declare module "csurf" {
import express = require('express');
function csurf(options?: {
value?: (req: express.Request) => string;
cookie?: csurf.CookieOptions;
}): express.RequestHandler;
module csurf {
export interface CookieOptions extends express.CookieOptions {
key: string;
}
}
export = csurf;
}