Skip to main content

Interface: CommonAncestorResultBranch<A, B>

lexical.CommonAncestorResultBranch

Node a and node b have a common ancestor but are on different branches, the a and b properties of this result are the ancestors of a and b that are children of the commonAncestor. Since they are siblings, their positions are comparable to determine order in the document.

Type parameters

NameType
Aextends LexicalNode
Bextends LexicalNode

Properties

a

Readonly a: ElementNode | A

The ancestor of a that is a child of commonAncestor

Defined in

packages/lexical/src/caret/LexicalCaret.ts:1307


b

Readonly b: ElementNode | B

The ancestor of b that is a child of commonAncestor

Defined in

packages/lexical/src/caret/LexicalCaret.ts:1309


commonAncestor

Readonly commonAncestor: ElementNode

Defined in

packages/lexical/src/caret/LexicalCaret.ts:1305


type

Readonly type: "branch"

Defined in

packages/lexical/src/caret/LexicalCaret.ts:1304