UNPKG

hivest-js

Version:

A simple, fast and minimalist framework for Node.js that allows you to create modular applications with dependency injection using decorators

24 lines 1.78 kB
import 'reflect-metadata'; export declare function Injectable(): (target: import("tsyringe/dist/typings/types").constructor<unknown>) => void; export declare function Register(token: string): (target: new (...args: any[]) => any) => new (...args: any[]) => any; export declare function Inject(token: string): any; export declare function Controller(options: { path?: string; }): (target: new (...args: any[]) => any) => new (...args: any[]) => any; export declare function Middleware(options?: { path?: string; }): (target: new (...args: any[]) => any) => new (...args: any[]) => any; export declare function HttpMiddleware(): (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => PropertyDescriptor; export declare const HttpPost: (path?: string) => (target: any, context?: any, ...args: any[]) => any; export declare const HttpGet: (path?: string) => (target: any, context?: any, ...args: any[]) => any; export declare const HttpPut: (path?: string) => (target: any, context?: any, ...args: any[]) => any; export declare const HttpPatch: (path?: string) => (target: any, context?: any, ...args: any[]) => any; export declare const HttpDelete: (path?: string) => (target: any, context?: any, ...args: any[]) => any; export declare function EventListener(eventName: string): (target: any, context?: any, ...args: any[]) => any; export declare function EventEmitter(eventName: string): (target: any, context?: any, ...args: any[]) => any; /** * Decorator para marcar uma classe como middleware de error handler * O AppModule detecta automaticamente e registra como error handler */ export declare function ErrorHandlerMiddleware(): (target: new (...args: any[]) => any) => new (...args: any[]) => any; //# sourceMappingURL=decorators.d.ts.map