1/* 2 * Copyright (c) 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 16The definitions of some interfaces implemented in js_sys_module/console/console.cpp are released under Mozilla license. 17The definitions of some interfaces implemented in js_sys_module/timer/timer.cpp are released under Mozilla license. 18 19The definitions and functions of these interfaces are consistent with the standard interfaces under mozilla license, 20but the implementation of specific functions is independent and self-developed. 21 22All interfaces are described in d.ts, the following is the interface written in d.ts under to Mozilla license 23 24export declare class console { 25 debug(message: string, ...arguments: any[]): void; 26 log(message: string, ...arguments: any[]): void; 27 info(message: string, ...arguments: any[]): void; 28 warn(message: string, ...arguments: any[]): void; 29 error(message: string, ...arguments: any[]): void; 30 assert(value?: Object, ...arguments: Object[]): void; 31 count(label?: string): void; 32 countReset(label?: string): void; 33 dir(dir?: Object): void; 34 dirxml(...arguments: Object[]): void; 35 group(...arguments: Object[]): void; 36 groupCollapsed(...arguments: Object[]): void; 37 groupEnd(): void; 38 table(tableData?: Object): void; 39 time(label?: string): void; 40 timeEnd(label?: string): void; 41 timeLog(label?: string, ...arguments: Object[]): void; 42 trace(...arguments: Object[]): void; 43} 44 45export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; 46 47export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; 48 49export declare function clearInterval(intervalID?: number): void; 50 51export declare function clearTimeout(timeoutID?: number): void;