SharedNumberSequence Class

Packages > @fluidframework/sequence > SharedNumberSequence

The SharedNumberSequence holds a sequence of numbers. Each number will be stored at a position within the sequence. See the sequence readme for details on working with sequences.

Signature:

export declare class SharedNumberSequence extends SharedSequence<number> 

Extends: SharedSequence<number>

Constructors

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

Properties

List of properties for this class
Property Modifiers Type Description
id string

Methods

List of methods on this class
Method Modifiers Description
create(runtime, id) static Create a new shared number sequence
getFactory() static Get a factory for SharedNumberSequence to register with the data store.
getRange(start, end)

Constructors

SharedNumberSequence.(constructor)

Constructs a new instance of the SharedNumberSequence class

Signature:

constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);

Parameters

List of parameters
Parameter Type Description
document IFluidDataStoreRuntime
id string
attributes IChannelAttributes

Properties

id

Signature:

id: string;

Methods

create

Create a new shared number sequence

Signature:

static create(runtime: IFluidDataStoreRuntime, id?: string): SharedNumberSequence;

Parameters

List of parameters
Parameter Type Description
runtime IFluidDataStoreRuntime data store runtime the new shared number sequence belongs to
id string optional name of the shared number sequence

Returns:

SharedNumberSequence

newly create shared number sequence (but not attached yet)

getFactory

Get a factory for SharedNumberSequence to register with the data store.

Signature:

static getFactory(): SharedNumberSequenceFactory;

Returns:

SharedNumberSequenceFactory

a factory that creates and load SharedNumberSequence

getRange

Signature:

getRange(start: number, end?: number): number[];

Parameters

List of parameters
Parameter Type Description
start number
end number

Returns:

number[]