mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
53 lines
1.7 KiB
TypeScript
53 lines
1.7 KiB
TypeScript
// Type definitions for inversify-restify-utils 1.0.0
|
|
// Project: https://github.com/inversify/inversify-restify-utils
|
|
// Definitions by: inversify <https://github.com/inversify/>
|
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
|
|
import * as restify from "restify";
|
|
import * as inversify from "inversify";
|
|
|
|
export namespace interfaces {
|
|
|
|
export interface InversifyRestifyServerConstructor {
|
|
new(kernel: inversify.interfaces.Kernel): InversifyRestifyServer;
|
|
}
|
|
|
|
export interface InversifyRestifyServer {
|
|
setConfig(fn: ConfigFunction): InversifyRestifyServer;
|
|
build(): restify.Server;
|
|
}
|
|
|
|
export interface ConfigFunction {
|
|
(app: restify.Server): void;
|
|
}
|
|
|
|
export interface HandlerDecoratorFactory {
|
|
(path: string, ...middleware: restify.RequestHandler[]): HandlerDecorator;
|
|
}
|
|
|
|
export interface HandlerDecorator {
|
|
(target: any, key: string, value: any): void;
|
|
}
|
|
|
|
}
|
|
|
|
export interface Controller {}
|
|
|
|
interface ServiceIdentifiers {
|
|
Controller: Symbol;
|
|
}
|
|
|
|
export var InversifyRestifyServer: interfaces.InversifyRestifyServerConstructor;
|
|
|
|
export var Controller: (path: string, ...middleware: restify.RequestHandler[]) => (target: any) => void;
|
|
|
|
export var Options: interfaces.HandlerDecoratorFactory;
|
|
export var Get: interfaces.HandlerDecoratorFactory;
|
|
export var Post: interfaces.HandlerDecoratorFactory;
|
|
export var Put: interfaces.HandlerDecoratorFactory;
|
|
export var Patch: interfaces.HandlerDecoratorFactory;
|
|
export var Head: interfaces.HandlerDecoratorFactory;
|
|
export var Delete: interfaces.HandlerDecoratorFactory;
|
|
export var Method: (method: string, path: string, ...middleware: restify.RequestHandler[]) => interfaces.HandlerDecorator;
|
|
export var TYPE: ServiceIdentifiers;
|