Home > @wixc3/typescript > findNode
Finds the first node (via DFS) satisfying the predicate
Signature:
export declare function findNode(source: ts.Node | ts.Node[], predicate: Predicate<ts.Node>): ts.Node | undefined;
Parameter | Type | Description |
---|---|---|
source | ts.Node \| ts.Node\[\] | |
predicate | [Predicate](/core3-utils/common.predicate.html)<ts.Node> |
Returns:
ts.Node | undefined