mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Add definitions for restify's conditionalHandler plugin
This commit is contained in:
Vendored
+12
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for restify 5.0
|
||||
// Project: https://github.com/restify/node-restify
|
||||
// Definitions by: Bret Little <https://github.com/blittle>, Steve Hipwell <https://github.com/stevehipwell>
|
||||
// Definitions by: Bret Little <https://github.com/blittle>, Steve Hipwell <https://github.com/stevehipwell>, Leandro Almeida <https://github.com/leanazulyoro>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -946,6 +946,17 @@ export namespace plugins {
|
||||
*/
|
||||
function authorizationParser(options?: any): RequestHandler;
|
||||
|
||||
interface HandlerCandidate {
|
||||
handler: RequestHandler | RequestHandler[];
|
||||
version?: string | string[];
|
||||
contentType?: string | string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs first handler that matches to the condition
|
||||
*/
|
||||
function conditionalHandler(candidates: HandlerCandidate | HandlerCandidate[]): RequestHandler[];
|
||||
|
||||
/**
|
||||
* Conditional headers (If-*)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user