@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 |
A helper class for building summary trees. |
Functions
Function | Alerts | Return Type | Description |
---|---|---|---|
compareFluidHandles(a, b) | boolean | Compare two IFluidHandles. | |
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
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
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>