Packages > @fluidframework/runtime-utils

@fluidframework/runtime-utils Package

Classes

Class Alerts Description
FluidHandleBase Legacy, Alpha Base class which can be uses to assist implementing IFluidHandleInternal.
RequestParser Legacy, Alpha The Request Parser takes an IRequest provides parsing and sub request creation
RuntimeFactoryHelper Legacy, Alpha
SummaryTreeBuilder Legacy, Alpha

Functions

Function Alerts Return Type Description
convertToSummaryTreeWithStats(snapshot, fullTree) Legacy, Alpha ISummaryTreeWithStats Converts snapshot ITree to ISummaryTree format and tracks stats.
create404Response(request) Legacy, Alpha IResponse
isFluidHandle(value) value is IFluidHandle Check if a value is an @fluidframework/core-interfaces#IFluidHandle.
toDeltaManagerInternal(deltaManager) Legacy, Alpha IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> Casts the public API for delta manager into the internal one, exposing access to APIs needed by the implementation of Fluid Framework but not its users.
toFluidHandleErased(handle) Legacy, Alpha IFluidHandleErased<T> Type erase IFluidHandleInternal for use with fluidHandleSymbol.
toFluidHandleInternal(handle) Legacy, Alpha IFluidHandleInternal<T> Downcast an IFluidHandle to an IFluidHandleInternal.

Function Details

convertToSummaryTreeWithStats

Converts snapshot ITree to ISummaryTree format and tracks stats.

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

To use, import via @fluidframework/runtime-utils/legacy.

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

Signature

export declare function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;

Parameters

Parameter Modifiers Type Description
snapshot ITree snapshot in ITree format
fullTree optional boolean true to never use handles, even if id is specified

Returns

Return type: ISummaryTreeWithStats

create404Response

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

To use, import via @fluidframework/runtime-utils/legacy.

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

Signature

create404Response: (request: IRequest) => IResponse

Parameters

Parameter Type Description
request IRequest

Returns

Return type: IResponse

isFluidHandle

Check if a value is an @fluidframework/core-interfaces#IFluidHandle.

Signature

export declare function isFluidHandle(value: unknown): value is IFluidHandle;

Remarks

Objects which have a field named IFluidHandle can in some cases produce a false positive.

Parameters

Parameter Type Description
value unknown

Returns

Return type: value is IFluidHandle

toDeltaManagerInternal

Casts the public API for delta manager into the internal one, exposing access to APIs needed by the implementation of Fluid Framework but not its users.

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

To use, import via @fluidframework/runtime-utils/legacy.

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

Signature

export declare function toDeltaManagerInternal(deltaManager: IDeltaManagerErased): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;

Parameters

Parameter Type Description
deltaManager IDeltaManagerErased

Returns

Return type: IDeltaManager <ISequencedDocumentMessage , IDocumentMessage >

toFluidHandleErased

Type erase IFluidHandleInternal for use with fluidHandleSymbol .

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

To use, import via @fluidframework/runtime-utils/legacy.

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

Signature

export declare function toFluidHandleErased<T>(handle: IFluidHandleInternal<T>): IFluidHandleErased<T>;
Type Parameters
Parameter Description
T

Parameters

Parameter Type Description
handle IFluidHandleInternal<T>

Returns

Return type: IFluidHandleErased <T>

toFluidHandleInternal

Downcast an IFluidHandle to an IFluidHandleInternal.

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

To use, import via @fluidframework/runtime-utils/legacy.

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

Signature

export declare function toFluidHandleInternal<T>(handle: IFluidHandle<T>): IFluidHandleInternal<T>;
Type Parameters
Parameter Description
T

Parameters

Parameter Type Description
handle IFluidHandle<T>

Returns

Return type: IFluidHandleInternal <T>