forked from fastify/fastify-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
45 lines (41 loc) · 906 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
37
38
39
40
41
42
43
44
45
import {
FastifyReply,
FastifyRequest,
HTTPMethod,
Plugin,
RouteSchema,
} from 'fastify';
import { IncomingMessage, Server, ServerResponse } from 'http';
import { DevServer } from 'next';
import { UrlLike } from 'next/router';
declare module 'fastify' {
type FastifyNextCallback = (
app: DevServer,
req: FastifyRequest<any>,
reply: FastifyReply<any>
) => Promise<void>;
interface FastifyInstance<
HttpServer = Server,
HttpRequest = IncomingMessage,
HttpResponse = ServerResponse
> {
next(
path: string,
opts:
| {
method: HTTPMethod;
schema: RouteSchema;
next: UrlLike;
}
| FastifyNextCallback,
handle?: FastifyNextCallback
): void;
}
}
declare const fastifyReact: Plugin<
Server,
IncomingMessage,
ServerResponse,
{ [key: string]: any }
>;
export = fastifyReact;