mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-10 00:20:22 -06:00
docs(lib): add @throws JSDoc for JSON methods (#61596)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
parent
5e36778330
commit
d88d3a4681
3
src/lib/es5.d.ts
vendored
3
src/lib/es5.d.ts
vendored
@ -1140,6 +1140,7 @@ interface JSON {
|
||||
* @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.
|
||||
* @throws {SyntaxError} If `text` is not valid JSON.
|
||||
*/
|
||||
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
||||
/**
|
||||
@ -1147,6 +1148,7 @@ interface JSON {
|
||||
* @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.
|
||||
* @throws {TypeError} If a circular reference or a BigInt value is found.
|
||||
*/
|
||||
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
||||
/**
|
||||
@ -1154,6 +1156,7 @@ interface JSON {
|
||||
* @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.
|
||||
* @throws {TypeError} If a circular reference or a BigInt value is found.
|
||||
*/
|
||||
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user