From 6fb604b076331ef6b9cdd236c4b7b4c655660588 Mon Sep 17 00:00:00 2001 From: ltdong Date: Sat, 26 Feb 2022 11:28:57 +0800 Subject: [PATCH] Add getAll api Signed-off-by: ltdong --- api/@ohos.data.preferences.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index c575537103..fce3a5ccad 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -99,6 +99,15 @@ declare namespace preferences { get(key: string, defValue: ValueType, callback: AsyncCallback): void; get(key: string, defValue: ValueType): Promise; + /** + * Obtains all values of a preferences. + * + * @throws BusinessError if invoked failed + * @since 8 + */ + getAll(callback: AsyncCallback>): void; + getAll(): Promise>; + /** * Checks whether the {@link Preferences} object contains a preferences matching a specified key. * -- Gitee