From 6bac4335fd76133aca0a1c01d33cfd30f6d1a039 Mon Sep 17 00:00:00 2001 From: Kwang Yul Seo Date: Sat, 18 Jul 2015 15:53:11 +0900 Subject: [PATCH] Improve types of serveStatic's option parameter. * index accepts a new index string or an array of string. * maxAges accepts a string accepted by the ms module. --- serve-static/serve-static.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serve-static/serve-static.d.ts b/serve-static/serve-static.d.ts index f7d7e502f..cbf9406d7 100644 --- a/serve-static/serve-static.d.ts +++ b/serve-static/serve-static.d.ts @@ -49,7 +49,7 @@ declare module "serve-static" { * By default this module will send "index.html" files in response to a request on a directory. * To disable this set false or to supply a new index pass a string or an array in preferred order. */ - index?: boolean; + index?: boolean|string|string[]; /** * Enable or disable Last-Modified header, defaults to true. Uses the file system's last modified value. @@ -59,7 +59,7 @@ declare module "serve-static" { /** * Provide a max-age in milliseconds for http caching, defaults to 0. This can also be a string accepted by the ms module. */ - maxAge?: number; + maxAge?: number|string; /** * Redirect to trailing "/" when the pathname is a dir. Defaults to true.