Created
March 26, 2016 15:22
-
-
Save Jason-Rev/44863e63369bad887edf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'JSONSelect' { | |
type Callback = (value: any) => any; | |
interface JsonSelectInstance { | |
match(obj: any): any[]; | |
foreach(obj: any, fn: Callback): void; | |
} | |
interface JsonSelect { | |
match(select: string, json: any): any[]; | |
match(select: string, args: string[], json: any): any[]; | |
foreach(select: string, json: any, callback: Callback): any[]; | |
foreach(select: string, args: string[], json: any, callback: Callback): any[]; | |
compile(select: string, json: any): JsonSelectInstance; | |
compile(select: string, args: string[], json: any): JsonSelectInstance; | |
} | |
const jsonSelect: JsonSelect; | |
export = jsonSelect; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment