Type alias ClosestAncestor<A, B>

ClosestAncestor<A, B>: Exclude<A | B, Descendant<Pattern>> extends never
    ? Exclude<(A | Ancestor<A>) & (B | Ancestor<B>), RegExpLiteral>
    : (A | Ancestor<A>) & (B | Ancestor<B>)

The type of the closest ancestor of two nodes with the given types.

Type Parameters

  • A extends Node

  • B extends Node