RunSegment Class
Packages > @fluidframework/sequence > RunSegment
Signature:
export declare class RunSegment extends SubSequence<SparseMatrixItem>
Extends: SubSequence<SparseMatrixItem>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(items) | Constructs a new instance of the RunSegment class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
items | SparseMatrixItem[] | ||
type | (not declared) | ||
typeString | static |
(not declared) |
Methods
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
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
Parameter | Type | Description |
---|---|---|
segment | ISegment |
Returns:
this
clone
Signature:
clone(start?: number, end?: number): RunSegment;
Parameters
Parameter | Type | Description |
---|---|---|
start | number | |
end | number |
Returns:
createSplitSegmentAt
Signature:
protected createSplitSegmentAt(pos: number): RunSegment;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number |
Returns:
fromJSONObject
Signature:
static fromJSONObject(spec: any): RunSegment;
Parameters
Parameter | Type | Description |
---|---|---|
spec | any |
Returns:
getTag
Signature:
getTag(pos: number): any;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number |
Returns:
any
is
Signature:
static is(segment: ISegment): segment is RunSegment;
Parameters
Parameter | Type | Description |
---|---|---|
segment | ISegment |
Returns:
segment is RunSegment
removeRange
Signature:
removeRange(start: number, end: number): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
start | number | |
end | number |
Returns:
boolean
setTag
Signature:
setTag(pos: number, tag: any): void;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number | |
tag | any |
Returns:
void