From 672f4b4fdbc5472013fedacddfdbe227a6deb22f Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Sun, 20 Mar 2022 11:48:51 +0000 Subject: [PATCH] update en/application-dev/reference/apis/js-apis-data-storage.md. Signed-off-by: Annie_wang --- .../reference/apis/js-apis-data-storage.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-data-storage.md b/en/application-dev/reference/apis/js-apis-data-storage.md index 33ee7b2bc7..6f563185d3 100644 --- a/en/application-dev/reference/apis/js-apis-data-storage.md +++ b/en/application-dev/reference/apis/js-apis-data-storage.md @@ -250,7 +250,7 @@ removeStorageFromCache(path: string): Promise<void> Removes the singleton **Storage** instance of a file from the cache. The removed instance cannot be used for data operations. Otherwise, data inconsistency will occur. -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 @@ -343,7 +343,7 @@ get(key: string, defValue: ValueType): Promise<ValueType> Obtains the value corresponding to a key. If the value is null or not in the default value format, the default value is returned. -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 @@ -426,7 +426,7 @@ put(key: string, value: ValueType): Promise<void> Obtains the **Storage** instance corresponding to the specified file, writes data to the **Storage** instance using a **Storage** API, and saves the modification 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 @@ -522,7 +522,7 @@ has(key: string): Promise<boolean> Checks whether the storage 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 @@ -604,7 +604,7 @@ delete(key: string): Promise<void> Deletes data with the specified key from this storage 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 @@ -678,7 +678,7 @@ flush(): Promise<void> Saves the modification of this object to the **Storage** 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 @@ -747,7 +747,7 @@ clear(): Promise<void> Clears this **Storage** 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