From 933862ec8717cf850f3b81d49cccb8e389e04bc1 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Sun, 20 Mar 2022 11:30:26 +0000 Subject: [PATCH] update en/application-dev/reference/apis/js-apis-data-preferences.md. Signed-off-by: Annie_wang --- .../reference/apis/js-apis-data-preferences.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-data-preferences.md b/en/application-dev/reference/apis/js-apis-data-preferences.md index 964159792a..bc3d5fdfcf 100644 --- a/en/application-dev/reference/apis/js-apis-data-preferences.md +++ b/en/application-dev/reference/apis/js-apis-data-preferences.md @@ -316,7 +316,7 @@ put(key: string, value: ValueType): Promise<void> Obtains the **Preferences** instance corresponding to the specified file, writes data to the **Preferences** instance using a **Preferences** API, and saves data to the file using **flush()** or **flushSync()**. -This method uses an asynchronous callback to return the result. +This method uses a promise to return the result. **System capability**: SystemCapability.DistributedDataManager.Preferences.Core @@ -383,7 +383,7 @@ has(key: string): Promise<boolean> Checks whether the **Preference** object contains data with a given key. -This method uses an asynchronous callback to return the result. +This method uses a promise to return the result. **System capability**: SystemCapability.DistributedDataManager.Preferences.Core @@ -502,7 +502,7 @@ flush(): Promise<void> Saves the modification of this object to the **Preferences** instance and synchronizes the modification to the file. -This method uses an asynchronous callback to return the result. +This method uses a promise to return the result. **System capability**: SystemCapability.DistributedDataManager.Preferences.Core @@ -555,7 +555,7 @@ clear(): Promise<void> Clears this **Preferences** object. -This method uses an asynchronous callback to return the result. +This method uses a promise to return the result. **System capability**: SystemCapability.DistributedDataManager.Preferences.Core -- GitLab