Home > @wixc3/typescript > match
Finds a node matching the pattern. The pattern is a valid TS statement
It may include:
//[ignore] to skip some of its structure,
//[return] to return an inner node instead of the root
Signature:
export declare function match(code: ts.Node, pattern: string): ts.Node | undefined;
Parameter | Type | Description |
---|---|---|
code | ts.Node | |
pattern | string |
Returns:
ts.Node | undefined