toFixed.d.ts 412 B

123456789101112131415
  1. /**
  2. * 将数值四舍五入并格式化为固定小数位的字符串
  3. * @param num 数值/字符串
  4. * @param digits 小数保留位数
  5. */
  6. export declare function toFixed(num: number | string | null, digits?: number): string;
  7. export declare function toFixed(num: any, digits?: number): string;
  8. declare module './ctor' {
  9. interface XEUtilsMethods {
  10. toFixed: typeof toFixed;
  11. }
  12. }
  13. export default toFixed