@fluidframework/runtime-utils Package
Classes
Class | Alerts | Description |
---|---|---|
FluidHandleBase | Legacy |
Base class which can be uses to assist implementing IFluidHandleInternal. |
RequestParser | Legacy |
The Request Parser takes an IRequest provides parsing and sub request creation |
RuntimeFactoryHelper | Legacy |
|
SummaryTreeBuilder | Legacy |
A helper class for building summary trees. |
Functions
Function | Alerts | Return Type | Description |
---|---|---|---|
compareFluidHandles(a, b) | boolean | Compare two IFluidHandles. | |
convertToSummaryTreeWithStats(snapshot, fullTree) | Legacy |
ISummaryTreeWithStats | Converts snapshot ITree to ISummaryTree format and tracks stats. |
create404Response(request) | Legacy |
IResponse | |
isFluidHandle(value) | value is IFluidHandle | Check if a value is an @fluidframework/core-interfaces#IFluidHandle. | |
isFluidHandlePayloadPending(handle) | Legacy |
handle is IFluidHandlePayloadPending<T> | Check if the handle is an IFluidHandlePayloadPending. |
isLocalFluidHandle(handle) | Legacy |
handle is ILocalFluidHandle<T> | Check if the handle is an ILocalFluidHandle. |
toDeltaManagerInternal(deltaManager) | Legacy |
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 |
IFluidHandleErased<T> | Type erase IFluidHandleInternal for use with fluidHandleSymbol. |
toFluidHandleInternal(handle) | Legacy |
IFluidHandleInternal<T> | Downcast an IFluidHandle to an IFluidHandleInternal. |
Function Details
compareFluidHandles
Compare two IFluidHandles.
Signature
export declare function compareFluidHandles(a: IFluidHandle, b: IFluidHandle): boolean;
Remarks
Returns true iff both handles have the same internal absolutePath
.
Parameters
Parameter | Type | Description |
---|---|---|
a | IFluidHandle | |
b | IFluidHandle |
Returns
Return type: boolean
convertToSummaryTreeWithStats
Converts snapshot ITree to ISummaryTree format and tracks stats.
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
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
isFluidHandlePayloadPending
Check if the handle is an IFluidHandlePayloadPending. \
To use, import via @fluidframework/runtime-utils/legacy
.
For more information about our API support guarantees, see here.
Signature
isFluidHandlePayloadPending: <T>(handle: IFluidHandle<T>) => handle is IFluidHandlePayloadPending<T>
Type Parameters
Parameter | Description |
---|---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
handle | IFluidHandle<T> |
Returns
Return type: handle is IFluidHandlePayloadPending<T>
isLocalFluidHandle
Check if the handle is an ILocalFluidHandle. \
To use, import via @fluidframework/runtime-utils/legacy
.
For more information about our API support guarantees, see here.
Signature
isLocalFluidHandle: <T>(handle: IFluidHandle<T>) => handle is ILocalFluidHandle<T>
Type Parameters
Parameter | Description |
---|---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
handle | IFluidHandle<T> |
Returns
Return type: handle is ILocalFluidHandle<T>
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. \
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. \
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. \
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>