forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
express-unless.d.ts
26 lines (21 loc) · 942 Bytes
/
express-unless.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
// Type definitions for express-unless
// Project: https://www.npmjs.org/package/express-unless
// Definitions by: Wonshik Kim <https://github.com/wokim/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare module "express-unless" {
import express = require('express');
function unless(options:unless.Options): express.RequestHandler;
namespace unless {
export interface Options {
custom?: (req: express.Request) => boolean;
path?: any; // TODO: union type 'string|string[]' is not supported yet
ext?: any; // TODO: union type 'string|string[]' is not supported yet
method?: any; // TODO: union type 'string|string[]' is not supported yet
}
export interface RequestHandler extends express.RequestHandler {
unless?: typeof unless;
}
}
export = unless;
}