From d2ce25cf9f95e3779c2e6f6794dd5ebac61c69f4 Mon Sep 17 00:00:00 2001 From: Gloria Date: Thu, 16 Mar 2023 17:16:53 +0800 Subject: [PATCH] fixed 77e1d1a from https://gitee.com/wusongqing/docs/pulls/16176 Update docs against 15720 Signed-off-by: wusongqing --- en/application-dev/application-models/itc-with-worker.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/application-dev/application-models/itc-with-worker.md b/en/application-dev/application-models/itc-with-worker.md index 8cbe53eeea..996ab941b0 100644 --- a/en/application-dev/application-models/itc-with-worker.md +++ b/en/application-dev/application-models/itc-with-worker.md @@ -18,7 +18,7 @@ To develop the Worker mode, perform the following steps: } ``` -2. Create the **worker.js** file based on the configuration in **build-profile.json5**. +2. Create the **worker.ts** file based on the configuration in **build-profile.json5**. ```ts import worker from '@ohos.worker'; @@ -58,7 +58,7 @@ To develop the Worker mode, perform the following steps: ```ts import worker from '@ohos.worker'; - let wk = new worker.ThreadWorker("../workers/worker.js"); + let wk = new worker.ThreadWorker("../workers/worker.ts"); // Send a message to the worker thread. wk.postMessage("message from main thread.") @@ -74,6 +74,6 @@ To develop the Worker mode, perform the following steps: > **NOTE** > -> - If the relative path of **worker.ts** configured in **build-profile.json5** is **./src/main/ets/workers/worker.ts**, pass in the path **entry/ets/workers/worker.ts** when creating a worker thread in the stage model, and pass in the path **../workers/worker.js** when creating a worker thread in the FA model. +> - If the relative path of **worker.ts** configured in **build-profile.json5** is **./src/main/ets/workers/worker.ts**, pass in the path **entry/ets/workers/worker.ts** when creating a worker thread in the stage model, and pass in the path **../workers/worker.ts** when creating a worker thread in the FA model. > > - For details about the data types supported between the main thread and worker thread, see [Sequenceable Data Types](../reference/apis/js-apis-worker.md#sequenceable-data-types). -- GitLab