(value: any)
| 125 | |
| 126 | // 转换辅助:在使用时将字符串转 number,写入时存字符串 |
| 127 | function toInt(value: any): number | undefined { |
| 128 | const n = Number(value); |
| 129 | return Number.isFinite(n) ? Math.trunc(n) : undefined; |
| 130 | } |
| 131 | |
| 132 | function toStrInt(value: any): string | undefined { |
| 133 | const n = Number(value); |
no outgoing calls
no test coverage detected