bignumber.js
bignumber.js copied to clipboard
change return type from "BigNumber" to "this"
The hard-coded return type "BigNumber" prevents subclasses from working correctly with TypeScript types when superclass methods are called.
See #368, this PR closes #368
Note: I didn't change the return type of static isBigNumber(value: any): value is BigNumber; because its name implies checking whether the instance is a specifically BigNumber. Also, it works in subclasses as expected because all subclasses are also instances of BigNumber.