SharedSequence Class

Packages > fluid-framework > SharedSequence

Signature:

export declare class SharedSequence<T> extends SharedSegmentSequence<SubSequence<T>> 

Extends: SharedSegmentSequenceSubSequence

Type parameters:

T

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(document, id, attributes, specToSegment) Constructs a new instance of the SharedSequence class

Properties

List of properties for this class
Property Modifiers Type Description
id

Methods

List of methods on this class
Method Modifiers Description
getItemCount() Returns the total count of items in the sequence
getItems(start, end) Gets the items in the specified range
insert(pos, items, props)
remove(start, end)

Constructors

SharedSequence.(constructor)

Constructs a new instance of the SharedSequence class

Signature:

constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes, specToSegment: (spec: IJSONSegment) => ISegment);

Parameters

List of parameters
Parameter Type Description
document
id
attributes
specToSegment

Properties

id

Signature:

id: string;

Methods

getItemCount

Returns the total count of items in the sequence

Signature:

getItemCount(): number;

Returns:

getItems

Gets the items in the specified range

Signature:

getItems(start: number, end?: number): Serializable<T>[];

Parameters

List of parameters
Parameter Type Description
start The inclusive start of the range
end The exclusive end of the range

Returns:

insert

Signature:

insert(pos: number, items: Serializable<T>[], props?: PropertySet): void;

Parameters

List of parameters
Parameter Type Description
pos The position to insert the items at.
items The items to insert.
props Optional. Properties to set on the inserted items.

Returns:

remove

Signature:

remove(start: number, end: number): void;

Parameters

List of parameters
Parameter Type Description
start The inclusive start of the range to remove
end The exclusive end of the range to remove

Returns: