UNPKG

@inversifyjs/container

Version:

InversifyJs container

30 lines 1.71 kB
import { type ServiceIdentifier } from '@inversifyjs/common'; import { type BindingActivation, type BindingDeactivation } from '@inversifyjs/core'; import { type BindToFluentSyntax } from '../../binding/models/BindingFluentSyntax.js'; import { type BindingIdentifier } from '../../binding/models/BindingIdentifier.js'; import { type IsBoundOptions } from './isBoundOptions.js'; export type Bind = <T>(serviceIdentifier: ServiceIdentifier<T>) => BindToFluentSyntax<T>; export type IsBound = (serviceIdentifier: ServiceIdentifier, options?: IsBoundOptions) => boolean; export type OnActivation = <T>(serviceIdentifier: ServiceIdentifier<T>, activation: BindingActivation<T>) => void; export type OnDeactivation = <T>(serviceIdentifier: ServiceIdentifier<T>, deactivation: BindingDeactivation<T>) => void; export type Rebind = <T>(serviceIdentifier: ServiceIdentifier<T>) => Promise<BindToFluentSyntax<T>>; export type RebindSync = <T>(serviceIdentifier: ServiceIdentifier<T>) => BindToFluentSyntax<T>; export type Unbind = (identifier: BindingIdentifier | ServiceIdentifier) => Promise<void>; export type UnbindSync = (identifier: BindingIdentifier | ServiceIdentifier) => void; export interface ContainerModuleLoadOptions { bind: Bind; isBound: IsBound; onActivation: OnActivation; onDeactivation: OnDeactivation; rebindAsync: Rebind; rebind: RebindSync; unbindAsync: Unbind; unbind: UnbindSync; } export declare class ContainerModule { #private; constructor(load: (options: ContainerModuleLoadOptions) => void | Promise<void>); get id(): number; load(options: ContainerModuleLoadOptions): void | Promise<void>; } //# sourceMappingURL=ContainerModule.d.ts.map