brandi
Version:
The dependency injection container.
43 lines (42 loc) • 1.55 kB
TypeScript
import { ResolutionCondition, UnknownCreator } from '../../types';
import { Token } from '../../pointers';
import { BindingsVault } from '../BindingsVault';
export declare class ScopeSyntax {
private readonly vault;
private readonly impl;
private readonly token;
private readonly condition?;
private readonly warningTimeout?;
constructor(vault: BindingsVault, impl: UnknownCreator, token: Token, condition?: ResolutionCondition | undefined);
/**
* @description
* The container will return the same instance with each getting.
* This is similar to being a singleton, however if the container has a child container or a clone,
* that child container or clone will get an instance unique to it.
*
* @link https://brandi.js.org/reference/binding-scopes#incontainerscope
*/
inContainerScope(): void;
/**
* @description
* The same instance will be got for each getting of this dependency during a single resolution chain.
*
* @link https://brandi.js.org/reference/binding-scopes#inresolutionscope
*/
inResolutionScope(): void;
/**
* @description
* Each getting will return the same instance.
*
* @link https://brandi.js.org/reference/binding-scopes#insingletonscope
*/
inSingletonScope(): void;
/**
* @description
* New instance will be created with each getting.
*
* @link https://brandi.js.org/reference/binding-scopes#intransientscope
*/
inTransientScope(): void;
private set;
}