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
Method | Return Type | Description |
---|---|---|
has(type) | boolean | Check 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
Parameter | Type | Description |
---|---|---|
type | string | Type 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
Parameter | Default | Description |
---|---|---|
O | ||
R | undefined | Record<string, never> |
Parameters
Parameter | Type | Description |
---|---|---|
optionalTypes | FluidObjectSymbolProvider<O> | optional types to be in the Scope object |
requiredTypes | Required<FluidObjectSymbolProvider<R>> | required types that need to be in the Scope object |
Returns
Return type: AsyncFluidObjectProvider<O, R>