forked from kolchurinvv/svelte-adapter-bun-kvv
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsirv.d.ts
More file actions
30 lines (26 loc) · 696 Bytes
/
sirv.d.ts
File metadata and controls
30 lines (26 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { Stats } from "fs";
type Arrayable<T> = T | T[];
type NextHandler = () => void | Promise<void>;
type RequestHandler = (req: RequestHandler, next?: NextHandler) => Response;
interface SirvFiles {
[key: string]: SirvData;
}
interface SirvData {
abs: string;
stats: Stats;
headers: Headers;
}
interface Options {
dev?: boolean;
etag?: boolean;
maxAge?: number;
immutable?: boolean;
single?: string | boolean;
ignores?: false | Arrayable<string | RegExp>;
extensions?: string[];
dotfiles?: boolean;
brotli?: boolean;
gzip?: boolean;
onNoMatch?: (req: Request) => Response;
setHeaders?: (headers: Headers, pathname: string, stats: Stats) => Headers;
}