-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathjsonselect.d.ts
More file actions
17 lines (13 loc) · 784 Bytes
/
jsonselect.d.ts
File metadata and controls
17 lines (13 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export interface IJsonSelectCompiled<T> {
match: (selector: string, values: any, object: any) => T[];
forEach: (selector: string, values: any, object: any, callback: (match: T) => void) => void;
}
export type Callback<T> = (match: T) => void;
declare module 'JSONSelect' {
export function match<T>(selector: string, values: any, object: any): T[];
export function match(selector: string, values: any, object: any): any[];
export function forEach<T>(selector: string, values: any, object: any, callback: Callback<T>): void;
export function forEach(selector: string, values: any, object: any, callback: Callback<any>): void;
export function compile<T>(selector: string): IJsonSelectCompiled<T>;
export function compile(selector: string): IJsonSelectCompiled<any>;
}