UNPKG

react-application-core

Version:

A react-based application core for the business applications.

38 lines (37 loc) 1.93 kB
import { interfaces } from 'inversify'; import { AnyT } from '../definitions.interface'; /** * @stable [26.04.2018] * @param {interfaces.ServiceIdentifier<T>} serviceIdentifier * @returns {any} */ export declare const staticInjector: <T>(serviceIdentifier: interfaces.ServiceIdentifier<T>) => any; /** * @stable [26.04.2018] * @param target * @returns {(target: any) => any} */ export declare const provideInSingleton: (target: interfaces.ServiceIdentifier<AnyT>) => (target: any) => any; /** * @stable [16.09.2019] * @param {interfaces.ServiceIdentifier<T> | {new(...args: AnyT[]): T}} contract * @param {{new(...args: AnyT[]): T}} implementation * @returns {interfaces.BindingWhenOnSyntax<any>} */ export declare const bindInSingleton: <T>(contract: string | symbol | interfaces.Newable<T> | interfaces.Abstract<T> | (new (...args: AnyT[]) => T), implementation?: new (...args: AnyT[]) => T) => interfaces.BindingWhenOnSyntax<T>; /** * @stable [24.09.2019] * @param {interfaces.ServiceIdentifier<T>} contract * @param {T} instance * @returns {interfaces.BindingWhenOnSyntax<any>} */ export declare const bindToConstantValue: <T>(contract: interfaces.ServiceIdentifier<T>, instance?: T) => interfaces.BindingWhenOnSyntax<T>; /** * @stable [08.06.2020] */ export declare class DiSupport { static readonly bindInSingleton: <T>(contract: string | symbol | interfaces.Newable<T> | interfaces.Abstract<T> | (new (...args: any[]) => T), implementation?: new (...args: any[]) => T) => interfaces.BindingWhenOnSyntax<T>; static readonly bindToConstantValue: <T>(contract: interfaces.ServiceIdentifier<T>, instance?: T) => interfaces.BindingWhenOnSyntax<T>; static readonly provideInSingleton: (target: interfaces.ServiceIdentifier<any>) => (target: any) => any; static readonly staticInjector: <T>(serviceIdentifier: interfaces.ServiceIdentifier<T>) => any; }