From 7fffaf5b65dfaa0b0baf938f36a7f4b4cce004a4 Mon Sep 17 00:00:00 2001 From: fuchao Date: Mon, 31 Oct 2022 11:09:37 +0800 Subject: [PATCH] Add throws comments Signed-off-by: fuchao --- api/@ohos.net.connection.d.ts | 1 + api/@ohos.net.http.d.ts | 1 + api/@ohos.net.socket.d.ts | 1 + api/@ohos.net.webSocket.d.ts | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/@ohos.net.connection.d.ts b/api/@ohos.net.connection.d.ts index 84576eeee7..ca278ee446 100644 --- a/api/@ohos.net.connection.d.ts +++ b/api/@ohos.net.connection.d.ts @@ -22,6 +22,7 @@ import socket from "./@ohos.net.socket"; * * @since 8 * @syscap SystemCapability.Communication.NetManager.Core + * @throws 9+ Will throw an error if the argument type or number is wrong */ declare namespace connection { type HttpRequest = http.HttpRequest; diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts index ce56e55549..33641ba1b9 100644 --- a/api/@ohos.net.http.d.ts +++ b/api/@ohos.net.http.d.ts @@ -20,6 +20,7 @@ import {AsyncCallback, Callback} from "./basic"; * * @since 6 * @syscap SystemCapability.Communication.NetStack + * @throws 9+ Will throw an error if the argument type or number is wrong */ declare namespace http { /** diff --git a/api/@ohos.net.socket.d.ts b/api/@ohos.net.socket.d.ts index 3fcdd5c8f9..cea5f6a24a 100644 --- a/api/@ohos.net.socket.d.ts +++ b/api/@ohos.net.socket.d.ts @@ -22,6 +22,7 @@ import cryptoFramework from "./@ohos.security.cryptoFramework"; * * @since 7 * @syscap SystemCapability.Communication.NetStack + * @throws 9+ Will throw an error if the argument type or number is wrong */ declare namespace socket { export import NetAddress = connection.NetAddress; diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index cbb967bee4..3c08289c5f 100644 --- a/api/@ohos.net.webSocket.d.ts +++ b/api/@ohos.net.webSocket.d.ts @@ -20,6 +20,7 @@ import {AsyncCallback, ErrorCallback} from "./basic"; * * @since 6 * @syscap SystemCapability.Communication.NetStack + * @throws 9+ Will throw an error if the argument type or number is wrong */ declare namespace webSocket { /** @@ -123,4 +124,4 @@ declare namespace webSocket { } } -export default webSocket; \ No newline at end of file +export default webSocket; -- Gitee