Skip to content 

RunSegment Class

Packages > @fluidframework/sequence > RunSegment

Signature:

export declare class RunSegment extends SubSequence<SparseMatrixItem> 

Extends: SubSequence<SparseMatrixItem>

Constructors

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

Properties

List of properties for this class
Property Modifiers Type Description
items SparseMatrixItem[]
type (not declared)
typeString static (not declared)

Methods

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

Constructors

RunSegment.(constructor)

Constructs a new instance of the RunSegment class

Signature:

constructor(items: SparseMatrixItem[]);

Parameters

List of parameters
Parameter Type Description
items SparseMatrixItem[]

Properties

items

Signature:

items: SparseMatrixItem[];

type

Signature:

readonly type = "RunSegment";

typeString

Signature:

static readonly typeString = "RunSegment";

Methods

append

Signature:

append(segment: ISegment): this;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

this

clone

Signature:

clone(start?: number, end?: number): RunSegment;

Parameters

List of parameters
Parameter Type Description
start number
end number

Returns:

RunSegment

createSplitSegmentAt

Signature:

protected createSplitSegmentAt(pos: number): RunSegment;

Parameters

List of parameters
Parameter Type Description
pos number

Returns:

RunSegment

fromJSONObject

Signature:

static fromJSONObject(spec: any): RunSegment;

Parameters

List of parameters
Parameter Type Description
spec any

Returns:

RunSegment

getTag

Signature:

getTag(pos: number): any;

Parameters

List of parameters
Parameter Type Description
pos number

Returns:

any

is

Signature:

static is(segment: ISegment): segment is RunSegment;

Parameters

List of parameters
Parameter Type Description
segment ISegment

Returns:

segment is RunSegment

removeRange

Signature:

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

Parameters

List of parameters
Parameter Type Description
start number
end number

Returns:

boolean

setTag

Signature:

setTag(pos: number, tag: any): void;

Parameters

List of parameters
Parameter Type Description
pos number
tag any

Returns:

void