slash-create-modify
Version:
Create and sync Discord slash commands!
27 lines (26 loc) • 1.02 kB
TypeScript
import { Server, ServerRequestHandler, ServerOptions } from '../server';
/**
* A server for Fastify applications.
* @see https://fastify.io
*/
export declare class FastifyServer extends Server {
private readonly app;
/**
* @param app The fastify application, or the options for initialization
* @param opts The server options
*/
constructor(app?: any, opts?: ServerOptions);
/**
* Adds middleware to the Fastify server.
* <warn>This requires you to have the 'middie' module registered to the server before using.</warn>
* @param middleware The middleware to add.
* @see https://www.fastify.io/docs/latest/Middleware/
*/
addMiddleware(middleware: Function): this;
/** Alias for {@link FastifyServer#addMiddleware} */
use(middleware: Function): this;
/** @private */
createEndpoint(path: string, handler: ServerRequestHandler): void;
/** @private */
listen(port?: number, host?: string): Promise<void>;
}