!14791 Fixing Issues in Public Base Library (codecheck)

Merge pull request !14791 from 李兴阳/master
This commit is contained in:
openharmony_ci 2024-11-20 07:27:56 +00:00 committed by Gitee
commit 38341b8dd8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -39,7 +39,7 @@ declare namespace json {
* @atomicservice
* @since 12
*/
type Transformer = (this: Object, key: string, value: Object) => Object | undefined | null
type Transformer = (this: Object, key: string, value: Object) => Object | undefined | null;
/**
* Converts a JavaScript Object Notation (JSON) string into an Object or null.
@ -48,7 +48,9 @@ declare namespace json {
* @param { Transformer } [reviver] - A function that transforms the results.
* @param {ParseOptions} options - The config of parse.
* @returns { Object | null } Return an Object, array, string, number, boolean, or null value corresponding to JSON text.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types; 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -60,16 +62,20 @@ declare namespace json {
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
*
* @param { Object } value - A JavaScript value, usually an Object or array.
* @param { (number | string)[] | null } [replacer] - An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringify.
* @param { (number | string)[] | null } [replacer] - An array of strings and numbers that acts as an approved list
* for selecting the object properties that will be stringify.
* @param { string | number } [space] - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
* @returns { string } Return a JSON text.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
function stringify(value: Object, replacer?: (number | string)[] | null, space?: string | number): string
function stringify(value: Object, replacer?: (number | string)[] | null, space?: string | number): string;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
@ -78,7 +84,10 @@ declare namespace json {
* @param { Transformer } [replacer] - A function that transforms the results.
* @param { string | number } [space] - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
* @returns { string } Return a JSON text.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice