File tree 1 file changed +6
-1
lines changed 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1039,14 +1039,19 @@ interface URIErrorConstructor {
1039
1039
1040
1040
declare const URIError : URIErrorConstructor ;
1041
1041
1042
+ type JSONPrimitive = string | number | boolean | null ;
1043
+ type JSONValue = JSONPrimitive | JSONObject | JSONArray ;
1044
+ type JSONObject = { [ member : string ] : JSONValue } ;
1045
+ interface JSONArray extends Array < JSONValue > { }
1046
+
1042
1047
interface JSON {
1043
1048
/**
1044
1049
* Converts a JavaScript Object Notation (JSON) string into an object.
1045
1050
* @param text A valid JSON string.
1046
1051
* @param reviver A function that transforms the results. This function is called for each member of the object.
1047
1052
* If a member contains nested objects, the nested objects are transformed before the parent object is.
1048
1053
*/
1049
- parse ( text : string , reviver ?: ( key : any , value : any ) => any ) : any ;
1054
+ parse ( text : string , reviver ?: ( key : any , value : any ) => any ) : JSONValue ;
1050
1055
/**
1051
1056
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
1052
1057
* @param value A JavaScript value, usually an object or array, to be converted.
You can’t perform that action at this time.
0 commit comments