UNPKG

@decorators/server

Version:

node decorators - decorators for express library

22 lines (21 loc) 2.42 kB
/// <reference types="node" /> import * as Fastify from 'fastify'; import { Server } from '../../core'; import { AdapterRoute, HttpApplicationAdapter, ParameterType } from '../http'; export declare class FastifyAdapter implements HttpApplicationAdapter { app: Fastify.FastifyInstance<import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, Fastify.FastifyBaseLogger, Fastify.FastifyTypeProviderDefault> & PromiseLike<Fastify.FastifyInstance<import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, Fastify.FastifyBaseLogger, Fastify.FastifyTypeProviderDefault>>; type: string; private server; constructor(app?: Fastify.FastifyInstance<import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, Fastify.FastifyBaseLogger, Fastify.FastifyTypeProviderDefault> & PromiseLike<Fastify.FastifyInstance<import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, Fastify.FastifyBaseLogger, Fastify.FastifyTypeProviderDefault>>); attachServer(server: Server): void; close(): Promise<void>; getParam(type: ParameterType, name: string, req: Fastify.FastifyRequest, res: Fastify.FastifyReply): () => any; isHeadersSent(response: Fastify.FastifyReply): boolean; listen(): Promise<void>; render(_response: Fastify.FastifyReply, template: string, message: object): Promise<string>; reply(response: Fastify.FastifyReply, message: unknown, statusCode?: number): Fastify.FastifyReply<Fastify.RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, Fastify.RouteGenericInterface, unknown, Fastify.FastifySchema, Fastify.FastifyTypeProviderDefault, unknown>; routes(routes: AdapterRoute[]): void; serveStatic(prefix: string, path: string, options?: object): void; setHeader(response: Fastify.FastifyReply, name: string, value: string): void; use(...args: any[]): void; }