Home > @rushstack/tree-pattern > ITreePatternCaptureSet

ITreePatternCaptureSet type

Provides additional detail about the success or failure of TreePattern.match().


export declare type ITreePatternCaptureSet = {
    [tagName: string]: TreeNode;
} | {
    failPath: string;

References: TreeNode


On success, the object will contain keys for any successfully matched tags, as defined using TreePattern.tag().

On failure, the failPath member will indicate the JSON path of the node that failed to match.