Type alias MatchResult<T, P>

MatchResult<T, P>: {
    node: T;
    parent: P extends undefined
        ? undefined
        : MatchResult<NonNullable<P>["target"], NonNullable<P>["parentPattern"]>;
}

A matcher result.

Type Parameters

Type declaration

  • node: T

    The matched node.

  • parent: P extends undefined
        ? undefined
        : MatchResult<NonNullable<P>["target"], NonNullable<P>["parentPattern"]>

    The parent node of the matched node.

Generated using TypeDoc