Comparing version 2.0.0 to 2.1.0-canary-4
@@ -6,3 +6,3 @@ import * as t from '@babel/types'; | ||
export declare type SimpleFunction<TKey extends string, TState> = (node: NodeType<TKey>, state: TState) => void; | ||
export declare function simple<TState>(node: t.Node, visitors: { | ||
export declare type SimpleVisitors<TState = void> = { | ||
[key in keyof t.Aliases | t.Node['type']]?: SimpleFunction<key, TState> | { | ||
@@ -12,5 +12,6 @@ enter?: SimpleFunction<key, TState>; | ||
}; | ||
}, state: TState): void; | ||
}; | ||
export declare function simple<TState>(node: t.Node, visitors: SimpleVisitors<TState>, state: TState): void; | ||
export declare type AncestorFunction<TKey extends string, TState> = (node: NodeType<TKey>, state: TState, ancestors: t.Node[]) => void; | ||
export declare function ancestor<TState>(node: t.Node, visitors: { | ||
export declare type AncestorVisitor<TState = void> = { | ||
[key in keyof t.Aliases | t.Node['type']]?: AncestorFunction<key, TState> | { | ||
@@ -20,5 +21,7 @@ enter?: AncestorFunction<key, TState>; | ||
}; | ||
}, state: TState): void; | ||
export declare function recursive<TState>(node: t.Node, visitors: { | ||
}; | ||
export declare function ancestor<TState = void>(node: t.Node, visitors: AncestorVisitor<TState>, state: TState): void; | ||
export declare type RecursiveVisitors<TState = void> = { | ||
[key in keyof t.Aliases | t.Node['type']]?: (node: NodeType<key>, state: TState, recurse: (node: t.Node) => void) => void; | ||
}, state: TState): void; | ||
}; | ||
export declare function recursive<TState>(node: t.Node, visitors: RecursiveVisitors<TState>, state: TState): void; |
{ | ||
"name": "babel-walk", | ||
"version": "2.0.0", | ||
"version": "2.1.0-canary-4", | ||
"description": "Lightweight Babel AST traversal", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37584
273
0
10
2