SubSequence Class

Packages > @fluidframework/sequence > SubSequence

Signature:

export declare class SubSequence<T> extends BaseSegment 

Extends: BaseSegment

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(items) Constructs a new instance of the SubSequence class

Properties

List of properties for this class
Property Modifiers Type Description
items T[]
type string
typeString static string

Methods

List of methods on this class
Method Modifiers Description
append(segment)
canAppend(segment)
clone(start, end)
createSplitSegmentAt(pos)
fromJSONObject(spec) static
is(segment) static
removeRange(start, end)
toJSONObject()
toString()

Constructors

SubSequence.(constructor)

Constructs a new instance of the SubSequence class

Signature:

constructor(items: T[]);

Parameters

List of parameters
Parameter Type Description
items T[]

Properties

items

Signature:

items: T[];

type

Signature:

readonly type: string;

typeString

Signature:

static readonly typeString: string;

Methods

append

Signature:

append(segment: ISegment): void;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

void

canAppend

Signature:

canAppend(segment: ISegment): boolean;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

boolean

clone

Signature:

clone(start?: number, end?: number): SubSequence<T>;

Parameters

List of parameters
Parameter Type Description
start number
end number

Returns:

SubSequence<T>

createSplitSegmentAt

Signature:

protected createSplitSegmentAt(pos: number): SubSequence<T>;

Parameters

List of parameters
Parameter Type Description
pos number

Returns:

SubSequence<T>

fromJSONObject

Signature:

static fromJSONObject(spec: any): SubSequence<any>;

Parameters

List of parameters
Parameter Type Description
spec any

Returns:

SubSequence<any>

is

Signature:

static is(segment: ISegment): segment is SubSequence<any>;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

segment is SubSequence<any>

removeRange

Signature:

removeRange(start: number, end: number): boolean;

Parameters

List of parameters
Parameter Type Description
start number
end number

Returns:

boolean

toJSONObject

Signature:

toJSONObject(): IJSONRunSegment<T>;

Returns:

IJSONRunSegment<T>

toString

Signature:

toString(): string;

Returns:

string