ant-design/components/theme/util/calc/calculator.ts
lijianan 55bb516e9e
chore: add jsDoc for cssVar calculator (#45809)
* chore: add jsDoc for cssVar calculator

* fix: add prefix

* fix: add prefix

* fix: add prefix
2023-11-13 09:58:43 +08:00

34 lines
984 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

abstract class AbstractCalculator {
/**
* @descCN 计算两数的和例如1 + 2
* @descEN Calculate the sum of two numbers, e.g. 1 + 2
*/
abstract add(num: number | string | AbstractCalculator): this;
/**
* @descCN 计算两数的差例如1 - 2
* @descEN Calculate the difference between two numbers, e.g. 1 - 2
*/
abstract sub(num: number | string | AbstractCalculator): this;
/**
* @descCN 计算两数的积例如1 * 2
* @descEN Calculate the product of two numbers, e.g. 1 * 2
*/
abstract mul(num: number | string | AbstractCalculator): this;
/**
* @descCN 计算两数的商例如1 / 2
* @descEN Calculate the quotient of two numbers, e.g. 1 / 2
*/
abstract div(num: number | string | AbstractCalculator): this;
/**
* @descCN 获取计算结果
* @descEN Get the calculation result
*/
abstract equal(options?: { unit?: boolean }): string | number;
}
export default AbstractCalculator;