-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
23 lines (21 loc) · 1.6 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export namespace JsonAsyncJs {
/** Converts a JavaScript Object Notation (JSON) string into an object.
* @param text A valid JSON string.
* @param reviver A function that transforms the results. This function is called for each member of the object.
* If a member contains nested objects, the nested objects are transformed before the parent object is.
*/
export function parse<T extends any>(text: string, reviver?: (this: any, key: string, value: any) => any): Promise<T | null>;
/** Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer A function that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
export function stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): Promise<string>
/** Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
export function stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): Promise<string>;
}
export default JsonAsyncJs;