UNPKG

767 BTypeScriptView Raw
1declare module 'devalue' {
2
3 /**
4 * Turn a value into the JavaScript that creates an equivalent value
5 *
6 */
7 export function uneval(value: any, replacer?: (value: any) => string | void): string;
8 /**
9 * Turn a value into a JSON string that can be parsed with `devalue.parse`
10 *
11 */
12 export function stringify(value: any, reducers?: Record<string, (value: any) => any>): string;
13 /**
14 * Revive a value serialized with `devalue.stringify`
15 *
16 */
17 export function parse(serialized: string, revivers?: Record<string, (value: any) => any>): any;
18 /**
19 * Revive a value flattened with `devalue.stringify`
20 *
21 */
22 export function unflatten(parsed: number | any[], revivers?: Record<string, (value: any) => any>): any;
23}
24
25
26//# sourceMappingURL=index.d.ts.map
\No newline at end of file