1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21 22 23/** 24 * Defines the console info. 25 * 26 * @syscap SystemCapability.ArkUI.ArkUI.Full 27 * @since 7 28 */ 29/** 30 * Defines the console info. 31 * 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @form 34 * @since 9 35 */ 36/** 37 * Defines the console info. 38 * 39 * @syscap SystemCapability.ArkUI.ArkUI.Full 40 * @crossplatform 41 * @form 42 * @since 10 43 */ 44/** 45 * Defines the console info. 46 * 47 * @syscap SystemCapability.ArkUI.ArkUI.Full 48 * @crossplatform 49 * @form 50 * @atomicservice 51 * @since 11 52 */ 53export declare class console { 54 /** 55 * Prints "debug" logs. 56 * 57 * @param { string } message - Text to print. 58 * @param { any[] } arguments 59 * @syscap SystemCapability.ArkUI.ArkUI.Full 60 * @since 7 61 */ 62 /** 63 * Prints "debug" logs. 64 * 65 * @param { string } message - Text to print. 66 * @param { any[] } arguments 67 * @syscap SystemCapability.ArkUI.ArkUI.Full 68 * @form 69 * @since 9 70 */ 71 /** 72 * Prints "debug" logs. 73 * 74 * @param { string } message - Text to print. 75 * @param { any[] } arguments 76 * @syscap SystemCapability.ArkUI.ArkUI.Full 77 * @crossplatform 78 * @form 79 * @since 10 80 */ 81 /** 82 * Prints "debug" logs. 83 * 84 * @param { string } message - Text to print. 85 * @param { any[] } arguments 86 * @syscap SystemCapability.ArkUI.ArkUI.Full 87 * @crossplatform 88 * @form 89 * @atomicservice 90 * @since 11 91 */ 92 static debug(message: string, ...arguments: any[]): void; 93 94 /** 95 * Prints "log" logs. 96 * 97 * @param { string } message - Text to print. 98 * @param { any[] } arguments 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @since 7 101 */ 102 /** 103 * Prints "log" logs. 104 * 105 * @param { string } message - Text to print. 106 * @param { any[] } arguments 107 * @syscap SystemCapability.ArkUI.ArkUI.Full 108 * @form 109 * @since 9 110 */ 111 /** 112 * Prints "log" logs. 113 * 114 * @param { string } message - Text to print. 115 * @param { any[] } arguments 116 * @syscap SystemCapability.ArkUI.ArkUI.Full 117 * @crossplatform 118 * @form 119 * @since 10 120 */ 121 /** 122 * Prints "log" logs. 123 * 124 * @param { string } message - Text to print. 125 * @param { any[] } arguments 126 * @syscap SystemCapability.ArkUI.ArkUI.Full 127 * @crossplatform 128 * @form 129 * @atomicservice 130 * @since 11 131 */ 132 static log(message: string, ...arguments: any[]): void; 133 134 /** 135 * Prints "info" logs. 136 * 137 * @param { string } message - Text to print. 138 * @param { any[] } arguments 139 * @syscap SystemCapability.ArkUI.ArkUI.Full 140 * @since 7 141 */ 142 /** 143 * Prints "info" logs. 144 * 145 * @param { string } message - Text to print. 146 * @param { any[] } arguments 147 * @syscap SystemCapability.ArkUI.ArkUI.Full 148 * @form 149 * @since 9 150 */ 151 /** 152 * Prints "info" logs. 153 * 154 * @param { string } message - Text to print. 155 * @param { any[] } arguments 156 * @syscap SystemCapability.ArkUI.ArkUI.Full 157 * @crossplatform 158 * @form 159 * @since 10 160 */ 161 /** 162 * Prints "info" logs. 163 * 164 * @param { string } message - Text to print. 165 * @param { any[] } arguments 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @crossplatform 168 * @form 169 * @atomicservice 170 * @since 11 171 */ 172 static info(message: string, ...arguments: any[]): void; 173 174 /** 175 * Prints "warn" logs. 176 * 177 * @param { string } message - Text to print. 178 * @param { any[] } arguments 179 * @syscap SystemCapability.ArkUI.ArkUI.Full 180 * @since 7 181 */ 182 /** 183 * Prints "warn" logs. 184 * 185 * @param { string } message - Text to print. 186 * @param { any[] } arguments 187 * @syscap SystemCapability.ArkUI.ArkUI.Full 188 * @form 189 * @since 9 190 */ 191 /** 192 * Prints "warn" logs. 193 * 194 * @param { string } message - Text to print. 195 * @param { any[] } arguments 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @crossplatform 198 * @form 199 * @since 10 200 */ 201 /** 202 * Prints "warn" logs. 203 * 204 * @param { string } message - Text to print. 205 * @param { any[] } arguments 206 * @syscap SystemCapability.ArkUI.ArkUI.Full 207 * @crossplatform 208 * @form 209 * @atomicservice 210 * @since 11 211 */ 212 static warn(message: string, ...arguments: any[]): void; 213 214 /** 215 * Prints "error" logs. 216 * 217 * @param { string } message - Text to print. 218 * @param { any[] } arguments 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @since 7 221 */ 222 /** 223 * Prints "error" logs. 224 * 225 * @param { string } message - Text to print. 226 * @param { any[] } arguments 227 * @syscap SystemCapability.ArkUI.ArkUI.Full 228 * @form 229 * @since 9 230 */ 231 /** 232 * Prints "error" logs. 233 * 234 * @param { string } message - Text to print. 235 * @param { any[] } arguments 236 * @syscap SystemCapability.ArkUI.ArkUI.Full 237 * @crossplatform 238 * @form 239 * @since 10 240 */ 241 /** 242 * Prints "error" logs. 243 * 244 * @param { string } message - Text to print. 245 * @param { any[] } arguments 246 * @syscap SystemCapability.ArkUI.ArkUI.Full 247 * @crossplatform 248 * @form 249 * @atomicservice 250 * @since 11 251 */ 252 static error(message: string, ...arguments: any[]): void; 253 254 /** 255 * Prints a message if value is false or omitted. 256 * 257 * @param { Object } [value] - The value tested for being truthy. 258 * @param { Object[] } arguments - Used as error message to print. 259 * @throws { BusinessError } 401 - The parameter check failed. 260 * @static 261 * @syscap SystemCapability.Utils.Lang 262 * @crossplatform 263 * @since 10 264 */ 265 /** 266 * Prints a message if value is false or omitted. 267 * 268 * @param { Object } [value] - The value tested for being truthy. 269 * @param { Object[] } arguments - Used as error message to print. 270 * @throws { BusinessError } 401 - The parameter check failed. 271 * @static 272 * @syscap SystemCapability.Utils.Lang 273 * @crossplatform 274 * @atomicservice 275 * @since 12 276 */ 277 static assert(value?: Object, ...arguments: Object[]): void; 278 279 /** 280 * Maintains an internal counter specific to label and print the number of times 281 * console.count() has been called with the given label. 282 * 283 * @param { string } [label] - Counter name. Default: "default". 284 * @throws { BusinessError } 401 - The parameter check failed. 285 * @static 286 * @syscap SystemCapability.Utils.Lang 287 * @crossplatform 288 * @since 10 289 */ 290 /** 291 * Maintains an internal counter specific to label and print the number of times 292 * console.count() has been called with the given label. 293 * 294 * @param { string } [label] - Counter name. Default: "default". 295 * @throws { BusinessError } 401 - The parameter check failed. 296 * @static 297 * @syscap SystemCapability.Utils.Lang 298 * @crossplatform 299 * @atomicservice 300 * @since 12 301 */ 302 static count(label?: string): void; 303 304 /** 305 * Reset the internal counter specific to label. 306 * 307 * @param { string } [label] - Counter name. Default: "default". 308 * @throws { BusinessError } 401 - The parameter check failed. 309 * @static 310 * @syscap SystemCapability.Utils.Lang 311 * @crossplatform 312 * @since 10 313 */ 314 /** 315 * Reset the internal counter specific to label. 316 * 317 * @param { string } [label] - Counter name. Default: "default". 318 * @throws { BusinessError } 401 - The parameter check failed. 319 * @static 320 * @syscap SystemCapability.Utils.Lang 321 * @crossplatform 322 * @atomicservice 323 * @since 12 324 */ 325 static countReset(label?: string): void; 326 327 /** 328 * Prints properties of the specified JavaScript object. 329 * 330 * @param { Object } [dir] - A JavaScript object whose properties should be output. 331 * @static 332 * @syscap SystemCapability.Utils.Lang 333 * @crossplatform 334 * @since 10 335 */ 336 /** 337 * Prints properties of the specified JavaScript object. 338 * 339 * @param { Object } [dir] - A JavaScript object whose properties should be output. 340 * @static 341 * @syscap SystemCapability.Utils.Lang 342 * @crossplatform 343 * @atomicservice 344 * @since 12 345 */ 346 static dir(dir?: Object): void; 347 348 /** 349 * This method calls console.log() passing it the arguments received. 350 * This method does not produce any XML formatting. 351 * 352 * @param { Object[] } arguments - Text to print. 353 * @static 354 * @syscap SystemCapability.Utils.Lang 355 * @crossplatform 356 * @since 10 357 */ 358 /** 359 * This method calls console.log() passing it the arguments received. 360 * This method does not produce any XML formatting. 361 * 362 * @param { Object[] } arguments - Text to print. 363 * @static 364 * @syscap SystemCapability.Utils.Lang 365 * @crossplatform 366 * @atomicservice 367 * @since 12 368 */ 369 static dirxml(...arguments: Object[]): void; 370 371 /** 372 * Creates a new inline group, causing any subsequent console messages to be indented by an additional level. 373 * 374 * @param { Object[] } arguments - messages to print first. 375 * @static 376 * @syscap SystemCapability.Utils.Lang 377 * @crossplatform 378 * @since 10 379 */ 380 /** 381 * Creates a new inline group, causing any subsequent console messages to be indented by an additional level. 382 * 383 * @param { Object[] } arguments - messages to print first. 384 * @static 385 * @syscap SystemCapability.Utils.Lang 386 * @crossplatform 387 * @atomicservice 388 * @since 12 389 */ 390 static group(...arguments: Object[]): void; 391 392 /** 393 * Same as console.group() 394 * 395 * @param { Object[] } arguments - messages to print first. 396 * @static 397 * @syscap SystemCapability.Utils.Lang 398 * @crossplatform 399 * @since 10 400 */ 401 /** 402 * Same as console.group() 403 * 404 * @param { Object[] } arguments - messages to print first. 405 * @static 406 * @syscap SystemCapability.Utils.Lang 407 * @crossplatform 408 * @atomicservice 409 * @since 12 410 */ 411 static groupCollapsed(...arguments: Object[]): void; 412 413 /** 414 * Exit current inline group. 415 * 416 * @static 417 * @syscap SystemCapability.Utils.Lang 418 * @crossplatform 419 * @since 10 420 */ 421 /** 422 * Exit current inline group. 423 * 424 * @static 425 * @syscap SystemCapability.Utils.Lang 426 * @crossplatform 427 * @atomicservice 428 * @since 12 429 */ 430 static groupEnd(): void; 431 432 /** 433 * Prints tabular data as a table. 434 * 435 * @param { Object } [tableData] - tabular data. 436 * @static 437 * @syscap SystemCapability.Utils.Lang 438 * @crossplatform 439 * @since 10 440 */ 441 /** 442 * Prints tabular data as a table. 443 * 444 * @param { Object } [tableData] - tabular data. 445 * @static 446 * @syscap SystemCapability.Utils.Lang 447 * @crossplatform 448 * @atomicservice 449 * @since 12 450 */ 451 static table(tableData?: Object): void; 452 453 /** 454 * Start a timer. 455 * 456 * @param { string } [label] - Timer name. Default: "default". 457 * @throws { BusinessError } 401 - The parameter check failed. 458 * @static 459 * @syscap SystemCapability.Utils.Lang 460 * @crossplatform 461 * @since 10 462 */ 463 /** 464 * Start a timer. 465 * 466 * @param { string } [label] - Timer name. Default: "default". 467 * @throws { BusinessError } 401 - The parameter check failed. 468 * @static 469 * @syscap SystemCapability.Utils.Lang 470 * @crossplatform 471 * @atomicservice 472 * @since 12 473 */ 474 static time(label?: string): void; 475 476 /** 477 * End a timer and print time duration. 478 * 479 * @param { string } [label] - Timer name. Default: "default". 480 * @throws { BusinessError } 401 - The parameter check failed. 481 * @static 482 * @syscap SystemCapability.Utils.Lang 483 * @crossplatform 484 * @since 10 485 */ 486 /** 487 * End a timer and print time duration. 488 * 489 * @param { string } [label] - Timer name. Default: "default". 490 * @throws { BusinessError } 401 - The parameter check failed. 491 * @static 492 * @syscap SystemCapability.Utils.Lang 493 * @crossplatform 494 * @atomicservice 495 * @since 12 496 */ 497 static timeEnd(label?: string): void; 498 499 /** 500 * Print the elapsed time and other data arguments. 501 * 502 * @param { string } [label] - Timer name. Default: "default". 503 * @param { Object[] } arguments - Text to print. 504 * @throws { BusinessError } 401 - The parameter check failed. 505 * @static 506 * @syscap SystemCapability.Utils.Lang 507 * @crossplatform 508 * @since 10 509 */ 510 /** 511 * Print the elapsed time and other data arguments. 512 * 513 * @param { string } [label] - Timer name. Default: "default". 514 * @param { Object[] } arguments - Text to print. 515 * @throws { BusinessError } 401 - The parameter check failed. 516 * @static 517 * @syscap SystemCapability.Utils.Lang 518 * @crossplatform 519 * @atomicservice 520 * @since 12 521 */ 522 static timeLog(label?: string, ...arguments: Object[]): void; 523 524 /** 525 * Prints stack information for the current code location. 526 * 527 * @param { Object[] } arguments - message to print. 528 * @static 529 * @syscap SystemCapability.Utils.Lang 530 * @crossplatform 531 * @since 10 532 */ 533 /** 534 * Prints stack information for the current code location. 535 * 536 * @param { Object[] } arguments - message to print. 537 * @static 538 * @syscap SystemCapability.Utils.Lang 539 * @crossplatform 540 * @atomicservice 541 * @since 12 542 */ 543 static trace(...arguments: Object[]): void; 544 545 /** 546 * Prints hybrid stack information for the current code location. 547 * 548 * @static 549 * @syscap SystemCapability.Utils.Lang 550 * @crossplatform 551 * @atomicservice 552 * @since 12 553 */ 554 static traceHybridStack(): void; 555} 556 557/** 558 * Sets the interval for repeatedly calling a function. 559 * 560 * @param { Function | string } handler - Indicates the function to be called after the timer goes off. 561 * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. 562 * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. 563 * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. 564 * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. 565 * @returns { number } Returns the timer ID. 566 * @syscap SystemCapability.ArkUI.ArkUI.Full 567 * @since 7 568 */ 569/** 570 * Sets the interval for repeatedly calling a function. 571 * 572 * @param { Function | string } handler - Indicates the function to be called after the timer goes off. 573 * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. 574 * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. 575 * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. 576 * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. 577 * @returns { number } Returns the timer ID. 578 * @syscap SystemCapability.ArkUI.ArkUI.Full 579 * @crossplatform 580 * @since 10 581 */ 582/** 583 * Sets the interval for repeatedly calling a function. 584 * 585 * @param { Function | string } handler - Indicates the function to be called after the timer goes off. 586 * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. 587 * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. 588 * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. 589 * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. 590 * @returns { number } Returns the timer ID. 591 * @syscap SystemCapability.ArkUI.ArkUI.Full 592 * @crossplatform 593 * @atomicservice 594 * @since 11 595 */ 596export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; 597 598/** 599 * Sets a timer after which a function will be executed. 600 * 601 * @param { Function | string } handler - Indicates the function to be called after the timer goes off. 602 * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. 603 * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. 604 * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. 605 * If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. 606 * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. 607 * @returns { number } Returns the timer ID. 608 * @syscap SystemCapability.ArkUI.ArkUI.Full 609 * @since 7 610 */ 611/** 612 * Sets a timer after which a function will be executed. 613 * 614 * @param { Function | string } handler - Indicates the function to be called after the timer goes off. 615 * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. 616 * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. 617 * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. 618 * If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. 619 * @param { any[] } [arguments] - Indicates additional arguments to pass to "handler" when the timer goes off. 620 * @returns { number } Returns the timer ID. 621 * @syscap SystemCapability.ArkUI.ArkUI.Full 622 * @crossplatform 623 * @since 10 624 */ 625/** 626 * Sets a timer after which a function will be executed. 627 * 628 * @param { Function | string } handler - Indicates the function to be called after the timer goes off. 629 * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. 630 * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. 631 * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. 632 * If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. 633 * @param { any[] } [arguments] - Indicates additional arguments to pass to "handler" when the timer goes off. 634 * @returns { number } Returns the timer ID. 635 * @syscap SystemCapability.ArkUI.ArkUI.Full 636 * @crossplatform 637 * @atomicservice 638 * @since 11 639 */ 640export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; 641 642/** 643 * Cancel the interval set by " setInterval()". 644 * 645 * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". 646 * @syscap SystemCapability.ArkUI.ArkUI.Full 647 * @since 7 648 */ 649/** 650 * Cancel the interval set by " setInterval()". 651 * 652 * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". 653 * @syscap SystemCapability.ArkUI.ArkUI.Full 654 * @crossplatform 655 * @since 10 656 */ 657/** 658 * Cancel the interval set by " setInterval()". 659 * 660 * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". 661 * @syscap SystemCapability.ArkUI.ArkUI.Full 662 * @crossplatform 663 * @atomicservice 664 * @since 11 665 */ 666export declare function clearInterval(intervalID?: number): void; 667 668/** 669 * Cancel the timer set by "setTimeout()". 670 * 671 * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". 672 * @syscap SystemCapability.ArkUI.ArkUI.Full 673 * @since 7 674 */ 675/** 676 * Cancel the timer set by "setTimeout()". 677 * 678 * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". 679 * @syscap SystemCapability.ArkUI.ArkUI.Full 680 * @crossplatform 681 * @since 10 682 */ 683/** 684 * Cancel the timer set by "setTimeout()". 685 * 686 * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". 687 * @syscap SystemCapability.ArkUI.ArkUI.Full 688 * @crossplatform 689 * @atomicservice 690 * @since 11 691 */ 692export declare function clearTimeout(timeoutID?: number): void; 693 694/** 695 * Defining syscap function. 696 * 697 * @param { string } syscap 698 * @returns { boolean } 699 * @syscap SystemCapability.ArkUI.ArkUI.Full 700 * @since 8 701 */ 702/** 703 * Defining syscap function. 704 * 705 * @param { string } syscap 706 * @returns { boolean } 707 * @syscap SystemCapability.ArkUI.ArkUI.Full 708 * @crossplatform 709 * @since 10 710 */ 711/** 712 * Defining syscap function. 713 * 714 * @param { string } syscap 715 * @returns { boolean } 716 * @syscap SystemCapability.ArkUI.ArkUI.Full 717 * @crossplatform 718 * @atomicservice 719 * @since 11 720 */ 721export declare function canIUse(syscap: string): boolean; 722 723/** 724 * Obtains all attributes of the component with the specified ID. 725 * 726 * @param { string } id - ID of the component whose attributes are to be obtained. 727 * @returns { string } 728 * @syscap SystemCapability.ArkUI.ArkUI.Full 729 * @since 9 730 * @test 731 */ 732/** 733 * Obtains all attributes of the component with the specified ID. 734 * 735 * @param { string } id - ID of the component whose attributes are to be obtained. 736 * @returns { string } 737 * @syscap SystemCapability.ArkUI.ArkUI.Full 738 * @crossplatform 739 * @since 10 740 * @test 741 */ 742/** 743 * Obtains all attributes of the component with the specified ID. 744 * 745 * @param { string } id - ID of the component whose attributes are to be obtained. 746 * @returns { string } 747 * @syscap SystemCapability.ArkUI.ArkUI.Full 748 * @crossplatform 749 * @atomicservice 750 * @since 11 751 * @test 752 */ 753export declare function getInspectorByKey(id: string): string; 754 755/** 756 * Get components tree. 757 * 758 * @returns { Object } 759 * @syscap SystemCapability.ArkUI.ArkUI.Full 760 * @since 9 761 * @test 762 */ 763/** 764 * Get components tree. 765 * 766 * @returns { Object } 767 * @syscap SystemCapability.ArkUI.ArkUI.Full 768 * @crossplatform 769 * @since 10 770 * @test 771 */ 772/** 773 * Get components tree. 774 * 775 * @returns { Object } 776 * @syscap SystemCapability.ArkUI.ArkUI.Full 777 * @crossplatform 778 * @atomicservice 779 * @since 11 780 * @test 781 */ 782export declare function getInspectorTree(): Object; 783 784/** 785 * Sends an event to the component with the specified ID. 786 * 787 * @param { string } id - ID of the component for which the event is to be sent. 788 * @param { number } action - Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11. 789 * @param { string } params - Event parameters. If there is no parameter, pass an empty string "". 790 * @returns { boolean } 791 * @syscap SystemCapability.ArkUI.ArkUI.Full 792 * @since 9 793 * @test 794 */ 795/** 796 * Sends an event to the component with the specified ID. 797 * 798 * @param { string } id - ID of the component for which the event is to be sent. 799 * @param { number } action - Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11. 800 * @param { string } params - Event parameters. If there is no parameter, pass an empty string "". 801 * @returns { boolean } 802 * @syscap SystemCapability.ArkUI.ArkUI.Full 803 * @crossplatform 804 * @since 10 805 * @test 806 */ 807/** 808 * Sends an event to the component with the specified ID. 809 * 810 * @param { string } id - ID of the component for which the event is to be sent. 811 * @param { number } action - Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11. 812 * @param { string } params - Event parameters. If there is no parameter, pass an empty string "". 813 * @returns { boolean } 814 * @syscap SystemCapability.ArkUI.ArkUI.Full 815 * @crossplatform 816 * @atomicservice 817 * @since 11 818 * @test 819 */ 820export declare function sendEventByKey(id: string, action: number, params: string): boolean; 821 822/** 823 * Send touch event. 824 * 825 * @param { TouchObject } event - TouchObject to be sent. 826 * @returns { boolean } 827 * @syscap SystemCapability.ArkUI.ArkUI.Full 828 * @since 9 829 * @test 830 */ 831/** 832 * Send touch event. 833 * 834 * @param { TouchObject } event - TouchObject to be sent. 835 * @returns { boolean } 836 * @syscap SystemCapability.ArkUI.ArkUI.Full 837 * @crossplatform 838 * @since 10 839 * @test 840 */ 841/** 842 * Send touch event. 843 * 844 * @param { TouchObject } event - TouchObject to be sent. 845 * @returns { boolean } 846 * @syscap SystemCapability.ArkUI.ArkUI.Full 847 * @crossplatform 848 * @atomicservice 849 * @since 11 850 * @test 851 */ 852export declare function sendTouchEvent(event: TouchObject): boolean; 853 854/** 855 * Send key event. 856 * 857 * @param { KeyEvent } event - KeyEvent to be sent. 858 * @returns { boolean } 859 * @syscap SystemCapability.ArkUI.ArkUI.Full 860 * @since 9 861 * @test 862 */ 863/** 864 * Send key event. 865 * 866 * @param { KeyEvent } event - KeyEvent to be sent. 867 * @returns { boolean } 868 * @syscap SystemCapability.ArkUI.ArkUI.Full 869 * @crossplatform 870 * @since 10 871 * @test 872 */ 873/** 874 * Send key event. 875 * 876 * @param { KeyEvent } event - KeyEvent to be sent. 877 * @returns { boolean } 878 * @syscap SystemCapability.ArkUI.ArkUI.Full 879 * @crossplatform 880 * @atomicservice 881 * @since 11 882 * @test 883 */ 884export declare function sendKeyEvent(event: KeyEvent): boolean; 885 886/** 887 * Send mouse event. 888 * 889 * @param { MouseEvent } event - MouseEvent to be sent. 890 * @returns { boolean } 891 * @syscap SystemCapability.ArkUI.ArkUI.Full 892 * @since 9 893 * @test 894 */ 895/** 896 * Send mouse event. 897 * 898 * @param { MouseEvent } event - MouseEvent to be sent. 899 * @returns { boolean } 900 * @syscap SystemCapability.ArkUI.ArkUI.Full 901 * @crossplatform 902 * @since 10 903 * @test 904 */ 905/** 906 * Send mouse event. 907 * 908 * @param { MouseEvent } event - MouseEvent to be sent. 909 * @returns { boolean } 910 * @syscap SystemCapability.ArkUI.ArkUI.Full 911 * @crossplatform 912 * @atomicservice 913 * @since 11 914 * @test 915 */ 916export declare function sendMouseEvent(event: MouseEvent): boolean; 917 918 /** 919 * Mark moduleNamespace which loaded by dynamic-import is collectable. 920 * 921 * @param { Object } namespace - moduleNamespace to be marked. 922 * @throws { BusinessError } 401 - if type of object is not moduleNameSpace. 923 * @syscap SystemCapability.Utils.Lang 924 * @systemapi 925 * @stagemodelonly 926 * @since 10 927 */ 928export declare function markModuleCollectable(namespace: Object): void; 929 930/** 931 * Support loading native module during the runtime phase. 932 * 933 * @param { string } moduleName - Indicates the native module name. 934 * @returns { Object } Returns the default export from the native module. 935 * @throws { BusinessError } 401 - The parameter check failed. 936 * @throws { BusinessError } 10200301 - Loading native module failed. 937 * @syscap SystemCapability.Utils.Lang 938 * @stagemodelonly 939 * @atomicservice 940 * @since 12 941 */ 942export declare function loadNativeModule(moduleName: string): Object;