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.
This commit is contained in:
Kwang Yul Seo
2015-07-18 15:58:23 +09:00
parent c0fdc8f774
commit 6bac4335fd
+2 -2
View File
@@ -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.