14d6c458bSopenharmony_ci/*
24d6c458bSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
34d6c458bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
44d6c458bSopenharmony_ci * you may not use this file except in compliance with the License.
54d6c458bSopenharmony_ci * You may obtain a copy of the License at
64d6c458bSopenharmony_ci *
74d6c458bSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
84d6c458bSopenharmony_ci *
94d6c458bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
104d6c458bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
114d6c458bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124d6c458bSopenharmony_ci * See the License for the specific language governing permissions and
134d6c458bSopenharmony_ci * limitations under the License.
144d6c458bSopenharmony_ci */
154d6c458bSopenharmony_ci
164d6c458bSopenharmony_ciThe definitions of some interfaces implemented in js_sys_module/console/console.cpp are released under Mozilla license.
174d6c458bSopenharmony_ciThe definitions of some interfaces implemented in js_sys_module/timer/timer.cpp are released under Mozilla license.
184d6c458bSopenharmony_ci
194d6c458bSopenharmony_ciThe definitions and functions of these interfaces are consistent with the standard interfaces under mozilla license,
204d6c458bSopenharmony_cibut the implementation of specific functions is independent and self-developed.
214d6c458bSopenharmony_ci
224d6c458bSopenharmony_ciAll interfaces are described in d.ts, the following is the interface written in d.ts under to Mozilla license
234d6c458bSopenharmony_ci
244d6c458bSopenharmony_ciexport declare class console {
254d6c458bSopenharmony_ci    debug(message: string, ...arguments: any[]): void;
264d6c458bSopenharmony_ci    log(message: string, ...arguments: any[]): void;
274d6c458bSopenharmony_ci    info(message: string, ...arguments: any[]): void;
284d6c458bSopenharmony_ci    warn(message: string, ...arguments: any[]): void;
294d6c458bSopenharmony_ci    error(message: string, ...arguments: any[]): void;
304d6c458bSopenharmony_ci    assert(value?: Object, ...arguments: Object[]): void;
314d6c458bSopenharmony_ci    count(label?: string): void;
324d6c458bSopenharmony_ci    countReset(label?: string): void;
334d6c458bSopenharmony_ci    dir(dir?: Object): void;
344d6c458bSopenharmony_ci    dirxml(...arguments: Object[]): void;
354d6c458bSopenharmony_ci    group(...arguments: Object[]): void;
364d6c458bSopenharmony_ci    groupCollapsed(...arguments: Object[]): void;
374d6c458bSopenharmony_ci    groupEnd(): void;
384d6c458bSopenharmony_ci    table(tableData?: Object): void;
394d6c458bSopenharmony_ci    time(label?: string): void;
404d6c458bSopenharmony_ci    timeEnd(label?: string): void;
414d6c458bSopenharmony_ci    timeLog(label?: string, ...arguments: Object[]): void;
424d6c458bSopenharmony_ci    trace(...arguments: Object[]): void;
434d6c458bSopenharmony_ci}
444d6c458bSopenharmony_ci
454d6c458bSopenharmony_ciexport declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number;
464d6c458bSopenharmony_ci
474d6c458bSopenharmony_ciexport declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number;
484d6c458bSopenharmony_ci
494d6c458bSopenharmony_ciexport declare function clearInterval(intervalID?: number): void;
504d6c458bSopenharmony_ci
514d6c458bSopenharmony_ciexport declare function clearTimeout(timeoutID?: number): void;