Skip to content

Commit

Permalink
chore: add missed type
Browse files Browse the repository at this point in the history
  • Loading branch information
jeasonstudio committed Jan 19, 2024
1 parent 5150a53 commit 6b083c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/traverse/traverse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { SyntaxNode } from '../ast';
import { isSyntaxNode, isSyntaxNodeList, keysInNode } from '../ast/base';
import { PartialDeep } from 'type-fest';

export type TraverseMatchFilter<N extends SyntaxNode = SyntaxNode> = PartialDeep<N>;

export interface TraversePath<N extends SyntaxNode = SyntaxNode> {
/**
* The key of the node
Expand Down Expand Up @@ -35,7 +37,7 @@ export interface TraversePath<N extends SyntaxNode = SyntaxNode> {
* Is the current node matches the filter
* @param filter The filter to match
*/
matches: (filter: PartialDeep<N>) => boolean;
matches: (filter: TraverseMatchFilter<N>) => boolean;
/**
* Check if the current node contains the offset
* @param offset
Expand Down

0 comments on commit 6b083c7

Please sign in to comment.