ast-kit
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -591,3 +591,3 @@ // src/check.ts | ||
continue; | ||
await cb2.apply(this, args); | ||
await cb2?.apply(this, args); | ||
} | ||
@@ -599,3 +599,3 @@ }, | ||
continue; | ||
await cb2.apply(this, args); | ||
await cb2?.apply(this, args); | ||
} | ||
@@ -602,0 +602,0 @@ } |
@@ -71,4 +71,4 @@ import * as t from '@babel/types'; | ||
interface WalkSetup { | ||
onEnter<T extends NodeType = NodeType>(type: T | T[] | WalkFilter<GetNode<T>>, cb: SetupCallback<T, GetNode<T>>): void; | ||
onLeave<T extends NodeType = NodeType>(type: T | T[] | WalkFilter<GetNode<T>>, cb: SetupCallback<T, GetNode<T>>): void; | ||
onEnter<T extends NodeType = NodeType>(type: T | T[] | WalkFilter<GetNode<T>>, cb?: SetupCallback<T, GetNode<T>>): void; | ||
onLeave<T extends NodeType = NodeType>(type: T | T[] | WalkFilter<GetNode<T>>, cb?: SetupCallback<T, GetNode<T>>): void; | ||
} | ||
@@ -75,0 +75,0 @@ type WalkFilter<N extends t.Node = t.Node> = (this: WalkThis<t.Node>, node: t.Node, parent: t.Node | null | undefined, key: string | null | undefined, index: number | null | undefined) => node is N; |
@@ -591,3 +591,3 @@ // src/check.ts | ||
continue; | ||
await cb2.apply(this, args); | ||
await cb2?.apply(this, args); | ||
} | ||
@@ -599,3 +599,3 @@ }, | ||
continue; | ||
await cb2.apply(this, args); | ||
await cb2?.apply(this, args); | ||
} | ||
@@ -602,0 +602,0 @@ } |
{ | ||
"name": "ast-kit", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"packageManager": "pnpm@8.6.0", | ||
@@ -5,0 +5,0 @@ "description": "AST Toolkit.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
71163