From e7c816932c0dedf32744a9dbfcfb85f26aaba00d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20Lepp=C3=A4nen?= Date: Thu, 11 Sep 2014 11:41:35 +0300 Subject: [PATCH] Added definition to route parameter handling As stated in Express docs: "Alternatively, you can pass only a callback, in which case you have the opportunity to alter the app.param() API". This case for app.param() is currently missing from the definitions. --- express/express.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/express/express.d.ts b/express/express.d.ts index d5d48308f9..2098de5b37 100644 --- a/express/express.d.ts +++ b/express/express.d.ts @@ -78,6 +78,8 @@ declare module "express" { param(name: string, handler: RequestParamHandler): T; param(name: string, matcher: RegExp): T; param(name: string, mapper: (param: any) => any): T; + // Alternatively, you can pass only a callback, in which case you have the opportunity to alter the app.param() API + param(callback: (name: string, matcher: RegExp) => RequestParamHandler): T; /** * Special-cased "all" method, applying the given route `path`,