UNPKG

@kephas/core

Version:

Provides a common infrastructure for all the other Kephas Framework components: ambient services, dynamic reflection, composition, application management, and others.

33 lines (32 loc) 1.59 kB
import { AbstractType } from "../type"; import { AppServiceInfoRegistry } from "./appServiceInfoRegistry"; /** * Marks a class as being contract for transient application services. * * @export * @param {boolean} [allowMultiple=false] Indicates whether multiple services may be registered with the same contract or not. * @param {AbstractType} [contractType] Indicates the contract type, if different from the decorated type. * @param {*} [contractToken] Indicates the contract token, if different from the contract type. */ export declare function AppServiceContract({ allowMultiple, contractType, contractToken, registry, ...args }?: { allowMultiple?: boolean; contractType?: AbstractType; contractToken?: any; registry?: AppServiceInfoRegistry; [key: string]: any; }): (type: AbstractType) => void; /** * Marks a class as being contract for singleton application services. * * @export * @param {boolean} [allowMultiple=false] Indicates whether multiple services may be registered with the same contract or not. * @param {AbstractType} [contractType] Indicates the contract type, if different from the decorated type. * @param {*} [contractToken] Indicates the contract token, if different from the contract type. */ export declare function SingletonAppServiceContract({ allowMultiple, contractType, contractToken, registry, ...args }?: { allowMultiple?: boolean; contractType?: AbstractType; contractToken?: any; registry?: AppServiceInfoRegistry; [key: string]: any; }): (type: AbstractType) => void;