UNPKG

1.32 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/json-parse-better-errors`
3
4# Summary
5This package contains type definitions for json-parse-better-errors (https://github.com/zkat/json-parse-better-errors#readme).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-parse-better-errors.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-parse-better-errors/index.d.ts)
10````ts
11export = json_parse_better_errors;
12
13/**
14 * Converts a JavaScript Object Notation (JSON) string into an object.
15 * @param text A valid JSON string.
16 * @param reviver A function that transforms the results. This function is called for each member of the object.
17 * If a member contains nested objects, the nested objects are transformed before the parent object is.
18 * @param context The number of characters to display in each direction around the position of an error.
19 */
20declare function json_parse_better_errors(
21 txt: string,
22 reviver?: (key: string, value: any) => any,
23 context?: number,
24): any;
25
26````
27
28### Additional Details
29 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
30 * Dependencies: none
31
32# Credits
33These definitions were written by [Daniel Rosenwasser](https://github.com/DanielRosenwasser).
34
\No newline at end of file