类型“typeof BigNumber”的参数不能赋给类型“Value”的参数。

类型“typeof BigNumber”的参数不能赋给类型“Value”的参数。
类型“typeof BigNumber”缺少类型“Instance”中的以下属性: c, e, s

 

原来:

bigNumber._toFixed = function (...arg: any) {
  return new bigNumber(this).isNaN() ? '0' : new bigNumber(_this.toFixed(...arg)).toString();
};

 

 

修改后:

bigNumber._toFixed = function (...arg: any) {
  const _this = Number(this);
  return new bigNumber(_this).isNaN() ? '0' : new bigNumber(_this.toFixed(...arg)).toString();
};

 

posted @ 2021-08-19 14:26  Redchar  阅读(524)  评论(0编辑  收藏  举报