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 * Counter component, which provides corresponding increment or decrement counting operations. 18 * @since 7 19 */ 20/** 21 * Counter component, which provides corresponding increment or decrement counting operations. 22 * @form 23 * @since 9 24 */ 25interface CounterInterface { 26 /** 27 * Return Counter. 28 * @since 7 29 */ 30 /** 31 * Return Counter. 32 * @form 33 * @since 9 34 */ 35 (): CounterAttribute; 36} 37 38/** 39 * Defines the Counter attribute functions. 40 * @since 7 41 */ 42/** 43 * Defines the Counter attribute functions. 44 * @form 45 * @since 9 46 */ 47declare class CounterAttribute extends CommonMethod<CounterAttribute> { 48 /** 49 * Listen to the event that the value increases. 50 * @since 7 51 */ 52 /** 53 * Listen to the event that the value increases. 54 * @form 55 * @since 9 56 */ 57 onInc(event: () => void): CounterAttribute; 58 59 /** 60 * Listens to the number decrease event. 61 * @since 7 62 */ 63 /** 64 * Listens to the number decrease event. 65 * @form 66 * @since 9 67 */ 68 onDec(event: () => void): CounterAttribute; 69} 70 71/** 72 * Defines Counter Component instance. 73 * @since 7 74 */ 75/** 76 * Defines Counter Component instance. 77 * @form 78 * @since 9 79 */ 80declare const CounterInstance: CounterAttribute; 81 82/** 83 * Defines Counter Component. 84 * @since 7 85 */ 86/** 87 * Defines Counter Component. 88 * @form 89 * @since 9 90 */ 91declare const Counter: CounterInterface; 92