Skip to main content
Version: v1

IFluidDependencySynthesizer Interface

IFluidDependencySynthesizer can generate IFluidObjects based on the IProvideFluidObject pattern. It allow for registering providers and uses synthesize to generate a new object with the optional and required types.

Signature

export interface IFluidDependencySynthesizer extends IProvideFluidDependencySynthesizer

Extends: IProvideFluidDependencySynthesizer

Methods

MethodReturn TypeDescription
has(type)booleanCheck if a given type is registered
synthesize(optionalTypes, requiredTypes)AsyncFluidObjectProvider<O, R>synthesize takes optional and required types and returns an object that will fulfill the defined types based off objects that has been previously registered.

Method Details

has

Check if a given type is registered

Signature

has(type: string): boolean;

Parameters

ParameterTypeDescription
typestringType to check

Returns

Return type: boolean

synthesize

synthesize takes optional and required types and returns an object that will fulfill the defined types based off objects that has been previously registered.

Signature

synthesize<O, R = undefined | Record<string, never>>(optionalTypes: FluidObjectSymbolProvider<O>, requiredTypes: Required<FluidObjectSymbolProvider<R>>): AsyncFluidObjectProvider<O, R>;
Type Parameters
ParameterDefaultDescription
O
Rundefined | Record<string, never>

Parameters

ParameterTypeDescription
optionalTypesFluidObjectSymbolProvider<O>optional types to be in the Scope object
requiredTypesRequired<FluidObjectSymbolProvider<R>>required types that need to be in the Scope object

Returns

Return type: AsyncFluidObjectProvider<O, R>