SharedObjectKind Interface
Packages > fluid-framework > SharedObjectKind
Defines a kind of shared object.
Signature
/** @sealed */
export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedType<readonly ["SharedObjectKind", TSharedObject]>
Extends: ErasedType <readonly [“SharedObjectKind”, TSharedObject]>
Type Parameters
Parameter | Default | Description |
---|---|---|
TSharedObject | unknown |
Remarks
Used in containers to register a shared object implementation, and to create new instances of a given type of shared object. See create(objectClass) and ContainerSchema for details.
Methods
Method | Return Type | Description |
---|---|---|
is(value) | value is IFluidLoadable & TSharedObject | Check whether an @fluidframework/core-interfaces#IFluidLoadable is an instance of this shared object kind. |
Method Details
is
Check whether an @fluidframework/core-interfaces#IFluidLoadable is an instance of this shared object kind.
Signature
is(value: IFluidLoadable): value is IFluidLoadable & TSharedObject;
Remarks
This should be used in place of instanceof
checks for shared objects, as their actual classes are not exported in Fluid’s public API.
Parameters
Parameter | Type | Description |
---|---|---|
value | IFluidLoadable |
Returns
Return type: value is IFluidLoadable & TSharedObject