Skip to main content

IMergeNodeCommon Interface

Common properties for a node in a merge tree.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here.

Signature

export interface IMergeNodeCommon

Properties

Property Alerts Type Description
index Alpha number The index of this node in its parent's list of children.
ordinal Alpha string A string that can be used for comparing the location of this node to other MergeNodes in the same tree. a.ordinal < b.ordinal if and only if a comes before b in a pre-order traversal of the tree.

Methods

Method Alerts Return Type Description
isLeaf() Alpha this is ISegment

Property Details

index

The index of this node in its parent's list of children.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/merge-tree/alpha.

For more information about our API support guarantees, see here.

Signature

index: number;

Type: number

ordinal

A string that can be used for comparing the location of this node to other MergeNodes in the same tree. a.ordinal < b.ordinal if and only if a comes before b in a pre-order traversal of the tree.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/merge-tree/alpha.

For more information about our API support guarantees, see here.

Signature

ordinal: string;

Type: string

Method Details

isLeaf

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/merge-tree/alpha.

For more information about our API support guarantees, see here.

Signature

isLeaf(): this is ISegment;

Returns

Return type: this is ISegment