diff --git a/en/application-dev/reference/apis/js-apis-inputmonitor.md b/en/application-dev/reference/apis/js-apis-inputmonitor.md index d6514f42799102b15c8e20a978fe71494c281dfd..a9f075f19b1dab7e8c60d97cf3573951ed6c30b1 100644 --- a/en/application-dev/reference/apis/js-apis-inputmonitor.md +++ b/en/application-dev/reference/apis/js-apis-inputmonitor.md @@ -37,7 +37,7 @@ Enables listening for global touch events. ```js try { - inputMonitor.on("touch", (touchEvent) => { + inputMonitor.on("touch", (touchEvent: TouchEvent) => { console.log(`Monitor on success ${JSON.stringify(touchEvent)}`); return false; }); @@ -99,7 +99,7 @@ Disables listening for global touch events. ```js // Disable listening for a single callback function. -function callback(touchEvent) { +let callback = (touchEvent: touchEvent) => { console.log(`Monitor on success ${JSON.stringify(touchEvent)}`); return false; }; @@ -114,7 +114,7 @@ try { ```js // Cancel listening for all callback functions. -function callback(touchEvent) { +let callback = (touchEvent: touchEvent) => { console.log(`Monitor on success ${JSON.stringify(touchEvent)}`); return false; }; @@ -148,7 +148,7 @@ Stops listening for global mouse events. ```js // Disable listening for a single callback. -function callback(mouseEvent) { +let callback = (mouseEvent: MouseEvent) => { console.log(`Monitor on success ${JSON.stringify(mouseEvent)}`); return false; }; @@ -163,7 +163,7 @@ try { ```js // Disable listening for all callback functions. -function callback(mouseEvent) { +let callback = (mouseEvent: MouseEvent) => { console.log(`Monitor on success ${JSON.stringify(mouseEvent)}`); return false; };