From f1fec2bd7a05a9627d936ca1715457f9db24eb8f Mon Sep 17 00:00:00 2001 From: baidu_38995579 Date: Tue, 12 Aug 2025 20:44:48 +0800 Subject: [PATCH] delete redundant [], and add lose []. Issue:https://gitee.com/openharmony/interface_sdk-js/issues/ICSMW7?from=project-issue Signed-off-by: baidu_38995579 --- api/@ohos.taskpool.d.ts | 2 +- api/@ohos.util.ArrayList.d.ts | 4 ++-- api/@ohos.util.json.d.ts | 2 +- api/@ohos.util.stream.d.ts | 40 +++++++++++++++++------------------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/api/@ohos.taskpool.d.ts b/api/@ohos.taskpool.d.ts index 600d63c84a..c2b486377c 100644 --- a/api/@ohos.taskpool.d.ts +++ b/api/@ohos.taskpool.d.ts @@ -1926,7 +1926,7 @@ declare namespace taskpool { * Tasks that have been executed cannot be added to the asynchronous queue. * * @param { Task } task - Task to be added to the asynchronous queue. - * @param { ?Priority } priority - Priority of the task. The default value is taskpool.Priority.MEDIUM. + * @param { ?Priority } [priority] - Priority of the task. The default value is taskpool.Priority.MEDIUM. * @returns { Promise } * @throws { BusinessError } 10200006 - An exception occurred during serialization. * @throws { BusinessError } 10200025 - dependent task not allowed. diff --git a/api/@ohos.util.ArrayList.d.ts b/api/@ohos.util.ArrayList.d.ts index 29f71166f0..3ee27aaf42 100644 --- a/api/@ohos.util.ArrayList.d.ts +++ b/api/@ohos.util.ArrayList.d.ts @@ -960,8 +960,8 @@ declare class ArrayList { * * @typedef { function } ArrayListCbFn * @param { T } value - The current element being processed - * @param { number } index - The index of the current element - * @param { ArrayList } arrlist - The ArrayList instance being traversed + * @param { number } [index] - The index of the current element + * @param { ArrayList } [arrlist] - The ArrayList instance being traversed * @returns { T } This callback does not return a value * @syscap SystemCapability.Utils.Lang * @atomicservice diff --git a/api/@ohos.util.json.d.ts b/api/@ohos.util.json.d.ts index c2722751f1..b865390738 100644 --- a/api/@ohos.util.json.d.ts +++ b/api/@ohos.util.json.d.ts @@ -70,7 +70,7 @@ declare namespace json { * @param { string } text - A valid JSON string. * @param { Type } type - A constructor or class representing the expected type of the parsed result. * @param { Transformer } [reviver] - A function that transforms the results. - * @param {ParseOptions} options - The config of parse. + * @param {ParseOptions} [options] - The config of parse. * @returns { T | null | undefined } Return an Object, array, string, number, boolean, undefined, or null value corresponding to JSON text. * @syscap SystemCapability.Utils.Lang * @crossplatform diff --git a/api/@ohos.util.stream.d.ts b/api/@ohos.util.stream.d.ts index 0df3286d9a..9680254afd 100644 --- a/api/@ohos.util.stream.d.ts +++ b/api/@ohos.util.stream.d.ts @@ -248,9 +248,9 @@ declare namespace stream { * Implemented by subclass inheritance. The implementation logic of flushing chunks in the buffer must not be * directly called. The call is controlled by Writable.write. * - * @param { string | Uint8Array } [chunk] - Data to be written. - * @param { string } [encoding] - Encoding type. - * @param { Function } [callback] - Callback after writing. + * @param { string | Uint8Array } chunk - Data to be written. + * @param { string } encoding - Encoding type. + * @param { Function } callback - Callback after writing. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -265,9 +265,9 @@ declare namespace stream { * Implemented by subclass inheritance. The implementation logic of flushing chunks in the buffer must not be * directly called. The call is controlled by Writable.write. * - * @param { string | Uint8Array } [chunk] - Data to be written. - * @param { string } [encoding] - Encoding type. - * @param { StreamCb } [callback] - Callback after writing. + * @param { string | Uint8Array } chunk - Data to be written. + * @param { string } encoding - Encoding type. + * @param { StreamCb } callback - Callback after writing. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -279,8 +279,8 @@ declare namespace stream { * The implementation logic of flushing chunks in the buffer in batches should not be actively called. * The call is controlled by Writable.write. * - * @param { string[] | Uint8Array[] } [chunks] - Data to be written. - * @param { Function } [callback] - Callback after writing. + * @param { string[] | Uint8Array[] } chunks - Data to be written. + * @param { Function } callback - Callback after writing. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -295,8 +295,8 @@ declare namespace stream { * The implementation logic of flushing chunks in the buffer in batches should not be actively called. * The call is controlled by Writable.write. * - * @param { string[] | Uint8Array[] } [chunks] - Data to be written. - * @param { StreamCb } [callback] - Callback after writing. + * @param { string[] | Uint8Array[] } chunks - Data to be written. + * @param { StreamCb } callback - Callback after writing. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -969,9 +969,9 @@ declare namespace stream { * Implemented by subclass inheritance. The implementation logic of flushing chunks in the buffer must not be * directly called. The call is controlled by Writable.write. * - * @param { string | Uint8Array } [chunk] - Data to be written. - * @param { string } [encoding] - Encoding type. - * @param { Function } [callback] - Callback after writing. + * @param { string | Uint8Array } chunk - Data to be written. + * @param { string } encoding - Encoding type. + * @param { Function } callback - Callback after writing. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -987,9 +987,9 @@ declare namespace stream { * Implemented by subclass inheritance. The implementation logic of flushing chunks in the buffer must not be * directly called. The call is controlled by Writable.write. * - * @param { string | Uint8Array } [chunk] - Data to be written. - * @param { string } [encoding] - Encoding type. - * @param { StreamCb } [callback] - Callback after writing. + * @param { string | Uint8Array } chunk - Data to be written. + * @param { string } encoding - Encoding type. + * @param { StreamCb } callback - Callback after writing. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -1002,8 +1002,8 @@ declare namespace stream { * The implementation logic of flushing chunks in the buffer in batches should not be actively called. * The call is controlled by Writable.write. * - * @param { string[] | Uint8Array[] } [chunks] - Data to be written. - * @param { Function } [callback] - Callback after writing. + * @param { string[] | Uint8Array[] } chunks - Data to be written. + * @param { Function } callback - Callback after writing. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -1019,8 +1019,8 @@ declare namespace stream { * The implementation logic of flushing chunks in the buffer in batches should not be actively called. * The call is controlled by Writable.write. * - * @param { string[] | Uint8Array[] } [chunks] - Data to be written. - * @param { StreamCb } [callback] - Callback after writing. + * @param { string[] | Uint8Array[] } chunks - Data to be written. + * @param { StreamCb } callback - Callback after writing. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice -- Gitee