讲一下代码转成TS local _max = _mall(2).break_even_interval local _tmpBuy = self.data.yuanbaoTotalBuyTime % _max return _max - _tmpBuy转成TS
时间: 2023-08-08 18:14:00 浏览: 95
Here's the TypeScript version of the code:
```
const _max: number = _mall(2).break_even_interval;
const _tmpBuy: number = self.data.yuanbaoTotalBuyTime % _max;
return _max - _tmpBuy;
```
In TypeScript, you need to declare variable types using ":" followed by the type name. The "number" type is used for numeric values. The "const" keyword is used to declare constants.
The rest of the code is mostly the same as the original code, except for some minor syntax changes.
阅读全文