IOrderedCollection Interface

Packages > @fluidframework/ordered-collection > IOrderedCollection

Ordered Collection interface

Collection of objects that has deterministic add and remove ordering. Object implementing this interface can be used as the data backing for the ConsensusOrderedCollection

Signature:

export interface IOrderedCollection<T = any> extends ISnapshotable<T> 

Extends: ISnapshotable<T>

Methods

List of methods of this class
Method Description
add(value) Adds a value to the collection
remove() Retrieves a value from the collection.
size() Return the size of the collection

Methods

add

Adds a value to the collection

Signature:

add(value: T): any;

Parameters

List of parameters
Parameter Type Description
value T

Returns:

any

remove

Retrieves a value from the collection.

Signature:

remove(): T;

Returns:

T

size

Return the size of the collection

Signature:

size(): number;

Returns:

number