forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
connect-slashes.d.ts
40 lines (30 loc) · 1.08 KB
/
connect-slashes.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
32
33
34
35
36
37
38
39
40
// Type definitions for connect-slashes
// Project: https://github.com/avinoamr/connect-slashes
// Definitions by: Sam Herrmann <https://github.com/samherrmann>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/* =================== USAGE ===================
import express = require('express');
import slashes = require('connect-slashes');
var app = express();
app.use(slashes());
=============================================== */
/// <reference path="../express/express.d.ts" />
declare module "connect-slashes" {
import express = require('express');
/**
* @see https://github.com/avinoamr/connect-slashes#usage
*/
function slashes (addTrailingSlashes?: boolean, options?: slashes.Options): express.RequestHandler;
module slashes {
/**
* Additional settings
* @see https://github.com/avinoamr/connect-slashes#additional-settings
*/
interface Options {
base?: string;
code?: number;
headers?: {[field: string]: string};
}
}
export = slashes;
}