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

Method Alerts Return Type Description
has(type) Alpha boolean Check if a given type is registered
synthesize(optionalTypes, requiredTypes) Alpha 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

This API is provided as an alpha preview and may change without notice.

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

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

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.

This API is provided as an alpha preview and may change without notice.

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

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
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>