From b58f34a0da5a484aaff597986ca42589370f2815 Mon Sep 17 00:00:00 2001 From: Gloria Date: Thu, 27 Jul 2023 18:44:42 +0800 Subject: [PATCH] Update docs against 20620 Signed-off-by: wusongqing --- en/application-dev/reference/apis/js-apis-hashmap.md | 2 +- en/application-dev/reference/apis/js-apis-treemap.md | 2 +- en/application-dev/reference/apis/js-apis-worker.md | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-hashmap.md b/en/application-dev/reference/apis/js-apis-hashmap.md index c880644673..7ddc19b60d 100644 --- a/en/application-dev/reference/apis/js-apis-hashmap.md +++ b/en/application-dev/reference/apis/js-apis-hashmap.md @@ -338,7 +338,7 @@ hashMap.clear(); keys(): IterableIterator<K> -Obtains an iterator that contains all the elements in this container. +Obtains an iterator that contains all the keys in this container. **System capability**: SystemCapability.Utils.Lang diff --git a/en/application-dev/reference/apis/js-apis-treemap.md b/en/application-dev/reference/apis/js-apis-treemap.md index f05edc6533..536b11e5a8 100644 --- a/en/application-dev/reference/apis/js-apis-treemap.md +++ b/en/application-dev/reference/apis/js-apis-treemap.md @@ -4,7 +4,7 @@ **TreeMap** is implemented using a red-black tree, which is a binary search tree where keys are stored in sorted order for efficient insertion and removal. -**[HashMap](js-apis-treemap.md)** is faster in accessing data than **TreeMap**, because the former accesses data based on the hash code of the key, whereas the latter stores and accesses the keys in sorted order. +**[HashMap](js-apis-hashmap.md)** is faster in accessing data than **TreeMap**, because the former accesses data based on the hash code of the key, whereas the latter stores and accesses the keys in sorted order. Recommended use case: Use **TreeMap** when you need to store KV pairs in sorted order. diff --git a/en/application-dev/reference/apis/js-apis-worker.md b/en/application-dev/reference/apis/js-apis-worker.md index 6d1bff42d4..f964d85fe5 100644 --- a/en/application-dev/reference/apis/js-apis-worker.md +++ b/en/application-dev/reference/apis/js-apis-worker.md @@ -89,7 +89,7 @@ const workerFAModel02 = new worker.ThreadWorker("../workers/worker.ts"); // In the stage model, the workers directory is at the same level as the pages directory in the entry module. const workerStageModel01 = new worker.ThreadWorker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"}); -// In the stage model, the workers directory is at the same level as the parent directory of the pages directory in the entry module. +// In the stage model, the workers directory is a child directory of the pages directory in the entry module. const workerStageModel02 = new worker.ThreadWorker('entry/ets/pages/workers/worker.ts'); // For the script URL "entry/ets/workers/worker.ts" in the stage model: @@ -101,7 +101,7 @@ const workerStageModel02 = new worker.ThreadWorker('entry/ets/pages/workers/work // workerdir indicates the directory where the worker file is located, and workerfile indicates the worker file name. // In the stage model, the workers directory is at the same level as the pages directory in the entry module, and bundlename is com.example.workerdemo. const workerStageModel03 = new worker.ThreadWorker('@bundle:com.example.workerdemo/entry/ets/workers/worker'); -// In the stage model, the workers directory is at the same level as the parent directory of the pages directory in the entry module, and bundlename is com.example.workerdemo. +// In the stage model, the workers directory is a child directory of the pages directory in the entry module, and bundlename is com.example.workerdemo. const workerStageModel04 = new worker.ThreadWorker('@bundle:com.example.workerdemo/entry/ets/pages/workers/worker'); ``` @@ -1199,7 +1199,7 @@ const workerFAModel02 = new worker.Worker("../workers/worker.ts"); // In the stage model, the workers directory is at the same level as the pages directory. const workerStageModel01 = new worker.Worker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"}); -// In the stage model, the workers directory is at the same level as the child directory of the pages directory. +// In the stage model, the workers directory is a child directory of the pages directory. const workerStageModel02 = new worker.Worker('entry/ets/pages/workers/worker.ts'); // For the script URL "entry/ets/workers/worker.ts" in the stage model: @@ -2224,4 +2224,5 @@ Configuration of the **build-profile.json5** file: } } ``` - + + \ No newline at end of file -- GitLab