forked from fastify/fastify-static
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
36 lines (30 loc) · 950 Bytes
/
index.d.ts
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
31
32
33
34
35
36
// Definitions by: Jannik <https://github.com/jannikkeye>
// Leo <https://github.com/leomelzer>
import fastify = require("fastify");
import { Server, IncomingMessage, ServerResponse } from "http";
declare module "fastify" {
interface FastifyReply<HttpResponse> {
sendFile(filename: string): FastifyReply<HttpResponse>;
}
}
declare const fastifyStatic: fastify.Plugin<Server, IncomingMessage, ServerResponse, {
root: string;
prefix?: string;
serve?: boolean;
decorateReply?: boolean;
schemaHide?: boolean;
setHeaders?: (...args: any[]) => void;
redirect?: boolean;
wildcard?: boolean | string;
// Passed on to `send`
acceptRanges?: boolean;
cacheControl?: boolean;
dotfiles?: boolean;
etag?: boolean;
extensions?: string[];
immutable?: boolean;
index?: string[];
lastModified?: boolean;
maxAge?: string | number;
}>;
export = fastifyStatic;