BaseSegment Class
To use, import via @fluidframework/merge-tree/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare abstract class BaseSegment implements ISegment
Implements: ISegment
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(properties) | Beta |
Constructs a new instance of the BaseSegment class |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
attribution | Beta |
optional |
IAttributionCollection<AttributionKey> | |
cachedLength | Beta |
number | ||
properties | Beta |
optional |
PropertySet | |
trackingCollection | Beta |
readonly |
TrackingGroupCollection | |
type | Beta |
readonly |
string |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
addSerializedProps(jseg) | Beta |
void | |
append(other) | Beta |
void | |
canAppend(segment) | Beta |
boolean | |
clone() | Beta |
ISegment | |
cloneInto(b) | Beta |
void | |
createSplitSegmentAt(pos) | Beta |
BaseSegment | undefined | |
hasProperty(key) | Beta |
boolean | |
isLeaf() | Beta |
this is ISegment | |
splitAt(pos) | Beta |
ISegment | undefined | |
toJSONObject() | Beta |
any |
Constructor Details
(constructor)
Constructs a new instance of the BaseSegment
class
For more information about our API support guarantees, see here.
Signature
constructor(properties?: PropertySet);
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
properties | optional | PropertySet |
Property Details
attribution
For more information about our API support guarantees, see here.
Signature
attribution?: IAttributionCollection<AttributionKey>;
Type: IAttributionCollection<AttributionKey>
cachedLength
For more information about our API support guarantees, see here.
Signature
cachedLength: number;
Type: number
properties
For more information about our API support guarantees, see here.
Signature
properties?: PropertySet;
Type: PropertySet
trackingCollection
For more information about our API support guarantees, see here.
Signature
readonly trackingCollection: TrackingGroupCollection;
Type: TrackingGroupCollection
type
For more information about our API support guarantees, see here.
Signature
abstract readonly type: string;
Type: string
Method Details
addSerializedProps
For more information about our API support guarantees, see here.
Signature
protected addSerializedProps(jseg: IJSONSegment): void;
Parameters
Parameter | Type | Description |
---|---|---|
jseg | IJSONSegment |
append
For more information about our API support guarantees, see here.
Signature
append(other: ISegment): void;
Parameters
Parameter | Type | Description |
---|---|---|
other | ISegment |
canAppend
For more information about our API support guarantees, see here.
Signature
canAppend(segment: ISegment): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
segment | ISegment |
Returns
Return type: boolean
clone
For more information about our API support guarantees, see here.
Signature
abstract clone(): ISegment;
Returns
Return type: ISegment
cloneInto
For more information about our API support guarantees, see here.
Signature
protected cloneInto(b: ISegment): void;
Parameters
Parameter | Type | Description |
---|---|---|
b | ISegment |
createSplitSegmentAt
For more information about our API support guarantees, see here.
Signature
protected abstract createSplitSegmentAt(pos: number): BaseSegment | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number |
Returns
Return type: BaseSegment | undefined
hasProperty
For more information about our API support guarantees, see here.
Signature
hasProperty(key: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
key | string |
Returns
Return type: boolean
isLeaf
For more information about our API support guarantees, see here.
Signature
isLeaf(): this is ISegment;
Returns
Return type: this is ISegment
splitAt
For more information about our API support guarantees, see here.
Signature
splitAt(pos: number): ISegment | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number |
Returns
Return type: ISegment | undefined
toJSONObject
For more information about our API support guarantees, see here.
Signature
abstract toJSONObject(): any;
Returns
Return type: any