forked from TheNoim/fastify-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
33 lines (24 loc) · 1.07 KB
/
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
/// <reference types="fastify" />
import * as fastify from 'fastify';
import * as http from "http";
import {RegisterOptions} from "fastify";
import {Plugin} from "fastify";
import {RequestHandler} from "fastify";
declare interface HttpServer extends http.Server {}
declare interface HttpRequest extends http.IncomingMessage {}
declare interface HttpResponse extends http.ServerResponse {}
declare interface FastifyVueOptions {
config?: Object
}
declare let fastifyVue: fastify.Plugin<HttpServer, HttpRequest, HttpResponse, FastifyVueOptions>;
declare module 'fastify' {
export interface FastifyInstance {
register<T extends RegisterOptions<HttpServer, HttpRequest, HttpResponse>>(plugin: Plugin<HttpServer, HttpRequest, HttpResponse, T>, opts?: FastifyVueOptions | T): FastifyInstance<HttpServer, HttpRequest, HttpResponse>
// noinspection SpellCheckingInspection
nuxt(path: String, options?: NuxtDecoratorOptions): void
}
export interface NuxtDecoratorOptions {
handler?: RequestHandler<HttpRequest, HttpResponse>
}
}
export = fastifyVue;