Skip to main content

IFluidDependencySynthesizer Interface

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

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/synthesize/legacy.

For more information about our API support guarantees, see here.

Signature​

export interface IFluidDependencySynthesizer extends IProvideFluidDependencySynthesizer

Extends: IProvideFluidDependencySynthesizer

Methods​

MethodAlertsReturn TypeDescription
has(type)BetabooleanCheck if a given type is registered
synthesize(optionalTypes, requiredTypes)BetaAsyncFluidObjectProvider<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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

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.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

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>