@@ -38,14 +38,14 @@ declare module "serve-static" {
38
38
etag ?: boolean ;
39
39
40
40
/**
41
- * Set file extension fallbacks. When set, if a file is not found, the given extensions will be added to the file name and search for.
41
+ * Set file extension fallbacks. When set, if a file is not found, the given extensions will be added to the file name and search for.
42
42
* The first that exists will be served. Example: ['html', 'htm'].
43
43
* The default value is false.
44
44
*/
45
- extensions ?: boolean ;
45
+ extensions ?: string [ ] ;
46
46
47
47
/**
48
- * By default this module will send "index.html" files in response to a request on a directory.
48
+ * By default this module will send "index.html" files in response to a request on a directory.
49
49
* To disable this set false or to supply a new index pass a string or an array in preferred order.
50
50
*/
51
51
index ?: boolean ;
@@ -63,17 +63,17 @@ declare module "serve-static" {
63
63
/**
64
64
* Redirect to trailing "/" when the pathname is a dir. Defaults to true.
65
65
*/
66
- redirect ?: number ;
66
+ redirect ?: boolean ;
67
67
68
68
/**
69
- * Function to set custom headers on response. Alterations to the headers need to occur synchronously.
69
+ * Function to set custom headers on response. Alterations to the headers need to occur synchronously.
70
70
* The function is called as fn(res, path, stat), where the arguments are:
71
71
* res the response object
72
72
* path the file path that is being sent
73
73
* stat the stat object of the file that is being sent
74
74
*/
75
- setHeaders ?: ( res , path , stat ) => any ;
75
+ setHeaders ?: ( res : express . Response , path : string , stat : any ) => any ;
76
76
} ) : express . Handler ;
77
-
77
+
78
78
export = serveStatic ;
79
- }
79
+ }
0 commit comments