@micro.ts/core
Version:
Microservice framework with Typescript
24 lines (23 loc) • 879 B
TypeScript
import { DiRegistry } from './DiRegistry';
import { ServiceOptions } from './types';
/**
* Provide custom configuration (transient, or scoped) for a service to register it in the DI container
* @param options
* @param registry
*/
export declare function Service(options?: ServiceOptions, registry?: DiRegistry): (target: any) => void;
/**
* Get constructor parameters even in constructor less services
* @param target
*/
export declare function getConstructorParams(target: any): any[];
/**
* Get Inject param types even in constructor less services
* @param target
*/
export declare function getInjectParamTypes(target: any): any[];
/**
* Decorator is used in constructor arguments, for services of app controllers
* @param key
*/
export declare function Inject(key?: any): (target: any, _propertyKey: string, parameterIndex: number | PropertyDescriptor) => void;