mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
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:
Vendored
+2
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user