From 15f02725f5ec8fa7d99b9fba0e50ccf242a3a167 Mon Sep 17 00:00:00 2001 From: Scott Yang Date: Sun, 7 Sep 2014 22:54:08 -0700 Subject: [PATCH] Update express.d.ts set/get types Express set/get actually allows any types, as seen from paragraphs directly under Settings on official docs at http://expressjs.com/api --- express/express.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/express/express.d.ts b/express/express.d.ts index d5d48308f9..24910a6389 100644 --- a/express/express.d.ts +++ b/express/express.d.ts @@ -833,15 +833,18 @@ declare module "express" { * app.set('foo', 'bar'); * app.get('foo'); * // => "bar" + * app.set('foo', ['bar', 'baz']); + * app.get('foo'); + * // => ["bar", "baz"] * * Mounted servers inherit their parent server's settings. * * @param setting * @param val */ - set(setting: string, val: string): Application; + set(setting: string, val: any): Application; get: { - (name: string): string; // Getter + (name: string): any; // Getter (name: string, ...handlers: RequestHandler[]): Application; (name: RegExp, ...handlers: RequestHandler[]): Application; };