Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change return type from "BigNumber" to "this" #369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ozum
Copy link

@ozum ozum commented Mar 12, 2024

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.

The hard-coded return type "BigNumber" prevents subclasses from working correctly with TypeScript types when super class methods are called.

See MikeMcl#368, this PR closes MikeMcl#368
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Return Type of Methods
1 participant