From e3629067efe38ba929ed4b60d4e18a48c1a2f6d7 Mon Sep 17 00:00:00 2001 From: zhouzhichao Date: Mon, 14 Mar 2022 15:30:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=8C=89=E7=85=A7HOS=5FSDK=E5=90=8C?= =?UTF-8?q?=E6=AD=A5OH=5FSDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouzhichao --- api/@ohos.document.d.ts | 81 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 api/@ohos.document.d.ts diff --git a/api/@ohos.document.d.ts b/api/@ohos.document.d.ts new file mode 100644 index 0000000000..0db932146b --- /dev/null +++ b/api/@ohos.document.d.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { AsyncCallback } from './basic' + +export default document; + +/** + * document + * @sysCap N/A + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @import import document from '@ohos.document'; + * @permission N/A + */ +declare namespace document { + export { choose }; + export { show }; + export { create }; +} + +/** + * choose. + * + * @note N/A + * @sysCap N/A + * @since 6 + * @permission N/A + * @function choose + * @param {string} type - type. + * @param {AsyncCallback} [callback] - callback. + * @returns {void | Promise} no callback return Promise otherwise return void + * @throws {TypedError} Parameter check failed + */ +declare function choose(types?: string[]): Promise; +declare function choose(callback: AsyncCallback): void; +declare function choose(types: string[], callback: AsyncCallback): void; + +/** + * show. + * + * @note N/A + * @sysCap N/A + * @since 6 + * @permission N/A + * @function show + * @param {string} uri - uri. + * @param {string} type - type. + * @param {AsyncCallback} [callback] - callback. + * @returns {void | Promise} no callback return Promise otherwise return void + * @throws {TypedError} Parameter check failed + */ +declare function show(uri: string, type: string): Promise; +declare function show(uri: string, type: string, callback: AsyncCallback): void; + +/** + * create. + * + * @note N/A + * @sysCap N/A + * @since 7 + * @permission N/A + * @function create + * @param {string} name - name. + * @param {AsyncCallback} [callback] - callback. + * @returns {void | Promise} no callback return Promise otherwise return void + * @throws {TypedError} Parameter check failed + */ +declare function create(name: string): Promise; +declare function create(name: string, callback: AsyncCallback): void; -- Gitee From 692ebfd17a5be811e37db677ce277ae7499854a4 Mon Sep 17 00:00:00 2001 From: zhouzhichao Date: Mon, 14 Mar 2022 15:52:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8C=89=E7=85=A7HOS=5FSDK=E5=90=8C?= =?UTF-8?q?=E6=AD=A5OH=5FSDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouzhichao --- api/@ohos.document.d.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/api/@ohos.document.d.ts b/api/@ohos.document.d.ts index 0db932146b..61b5fac66d 100644 --- a/api/@ohos.document.d.ts +++ b/api/@ohos.document.d.ts @@ -27,7 +27,6 @@ export default document; declare namespace document { export { choose }; export { show }; - export { create }; } /** @@ -63,19 +62,3 @@ declare function choose(types: string[], callback: AsyncCallback): void; */ declare function show(uri: string, type: string): Promise; declare function show(uri: string, type: string, callback: AsyncCallback): void; - -/** - * create. - * - * @note N/A - * @sysCap N/A - * @since 7 - * @permission N/A - * @function create - * @param {string} name - name. - * @param {AsyncCallback} [callback] - callback. - * @returns {void | Promise} no callback return Promise otherwise return void - * @throws {TypedError} Parameter check failed - */ -declare function create(name: string): Promise; -declare function create(name: string, callback: AsyncCallback): void; -- Gitee From 909f47aa431e8f77af006491de9ce1fa565fbfbc Mon Sep 17 00:00:00 2001 From: zhouzhichao Date: Wed, 16 Mar 2022 19:16:35 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8C=89=E7=85=A7HOS=5FSDK=E5=90=8C?= =?UTF-8?q?=E6=AD=A5OH=5FSDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouzhichao --- api/@ohos.document.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.document.d.ts b/api/@ohos.document.d.ts index 61b5fac66d..b4cf4e8d2e 100644 --- a/api/@ohos.document.d.ts +++ b/api/@ohos.document.d.ts @@ -18,7 +18,7 @@ export default document; /** * document - * @sysCap N/A + * @syscap SystemCapability.FileManagement.FileManagerService * @since 6 * @devices phone, tablet, tv, wearable, car * @import import document from '@ohos.document'; @@ -33,7 +33,7 @@ declare namespace document { * choose. * * @note N/A - * @sysCap N/A + * @syscap SystemCapability.FileManagement.FileManagerService * @since 6 * @permission N/A * @function choose @@ -50,7 +50,7 @@ declare function choose(types: string[], callback: AsyncCallback): void; * show. * * @note N/A - * @sysCap N/A + * @syscap SystemCapability.FileManagement.FileManagerService * @since 6 * @permission N/A * @function show -- Gitee From 04b371d95334c2eecdacb2b1b1a392a8dbdd2f89 Mon Sep 17 00:00:00 2001 From: zhouzhichao Date: Thu, 17 Mar 2022 14:55:40 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8C=89=E7=85=A7HOS=5FSDK=E5=90=8C?= =?UTF-8?q?=E6=AD=A5OH=5FSDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouzhichao --- api/@ohos.document.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.document.d.ts b/api/@ohos.document.d.ts index b4cf4e8d2e..a317209f44 100644 --- a/api/@ohos.document.d.ts +++ b/api/@ohos.document.d.ts @@ -20,7 +20,6 @@ export default document; * document * @syscap SystemCapability.FileManagement.FileManagerService * @since 6 - * @devices phone, tablet, tv, wearable, car * @import import document from '@ohos.document'; * @permission N/A */ -- Gitee