1/* 2 * Copyright (c) 2020 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 * Sets the interval for repeatedly calling a function. 18 * 19 * @param { Function } handler - Indicates the function to be called repeatedly at the interval. 20 * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. 21 * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. 22 * @returns { number } Returns the timer ID. 23 * @syscap SystemCapability.ArkUI.ArkUI.Lite 24 * @since 5 25 */ 26export declare function setInterval( 27 handler: Function, 28 delay: number, 29 ...arguments: any[] 30): number; 31 32/** 33 * Sets a timer after which a function will be executed. 34 * 35 * @param { Function } handler - Indicates the function to be called after the timer goes off. 36 * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. 37 * 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. 38 * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. 39 * @returns { number } Returns the timer ID. 40 * @syscap SystemCapability.ArkUI.ArkUI.Lite 41 * @since 5 42 */ 43export declare function setTimeout( 44 handler: Function, 45 delay?: number, 46 ...arguments: any[] 47): number; 48 49/** 50 * Cancels the interval set by " setInterval()". 51 * 52 * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". 53 * @syscap SystemCapability.ArkUI.ArkUI.Lite 54 * @since 5 55 */ 56export declare function clearInterval(intervalID?: number): void; 57 58/** 59 * Cancels the timer set by " setTimeout()". 60 * 61 * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". 62 * @syscap SystemCapability.ArkUI.ArkUI.Lite 63 * @since 5 64 */ 65export declare function clearTimeout(timeoutID?: number): void; 66 67/** 68 * Get the java interface instance. The java instance needs to register, otherwise it cannot be obtained. 69 * After obtaining the instance, you can call the function with the same name on the Java side. 70 * 71 * @param { string } [name] - Java interface name, including package path, such as com.example.test.timeinterfaceimpl. 72 * @returns { any } A promise object is returned. The resolve callback is the object of PA. 73 * The reject callback returns the object containing code and error data. 74 * @syscap SystemCapability.ArkUI.ArkUI.Lite 75 * @since 5 76 * @deprecated since 8 77 */ 78export declare function createLocalParticleAbility(name?: string): any; 79 80/** 81 * Conditional compilation for rich equipment 82 * 83 * @syscap SystemCapability.ArkUI.ArkUI.Lite 84 * @since 5 85 */ 86export declare const STANDARD: string; 87 88/** 89 * Conditional compilation for lite equipment 90 * 91 * @syscap SystemCapability.ArkUI.ArkUI.Lite 92 * @since 5 93 */ 94export declare const LITE: string; 95 96/** 97 * Defining syscap function. 98 * 99 * @param { string } syscap 100 * @returns { boolean } 101 * @syscap SystemCapability.ArkUI.ArkUI.Lite 102 * @since 8 103 */ 104export declare function canIUse(syscap: string): boolean; 105 106/** 107 * Obtain the objects exposed in app.js 108 * 109 * @returns { object } 110 * @syscap SystemCapability.ArkUI.ArkUI.Lite 111 * @since 10 112 */ 113export declare function getApp(): object; 114