forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtraverse.d.ts
More file actions
22 lines (19 loc) · 682 Bytes
/
traverse.d.ts
File metadata and controls
22 lines (19 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Type definitions for traverse 0.6.6
// Project: https://github.com/substack/js-traverse
// Definitions by: newclear <https://github.com/newclear>
// Definitions: https://github.com/newclear/DefinitelyTyped
declare module "traverse" {
interface Traverse {
get(paths: string[]): any;
has(paths: string[]): boolean;
set(paths: string[], value: any): any;
map(cb: (v: any) => void): any;
forEach(cb: (v: any) => void): any;
reduce(cb: (acc: any, v: any) => void, init?: any): any;
paths(): string[];
nodes(): any[];
clone(): any;
}
function traverse(obj: any): Traverse;
export = traverse;
}