diff --git a/src/traverse/traverse.ts b/src/traverse/traverse.ts index c1149d3..65d8dd5 100644 --- a/src/traverse/traverse.ts +++ b/src/traverse/traverse.ts @@ -4,6 +4,8 @@ import { SyntaxNode } from '../ast'; import { isSyntaxNode, isSyntaxNodeList, keysInNode } from '../ast/base'; import { PartialDeep } from 'type-fest'; +export type TraverseMatchFilter = PartialDeep; + export interface TraversePath { /** * The key of the node @@ -35,7 +37,7 @@ export interface TraversePath { * Is the current node matches the filter * @param filter The filter to match */ - matches: (filter: PartialDeep) => boolean; + matches: (filter: TraverseMatchFilter) => boolean; /** * Check if the current node contains the offset * @param offset