getKeyRecoveryParam method reusing variable e
, type incorrect
#232
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@types/elliptic
states thatgetKeyRecoveryParam
e
variable isError | undefined
: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a9f3af6e4416678bad8027c15627683621f532f1/types/elliptic/index.d.ts#L219However, other than within the scope of the
catch (e) {...}
where it isError | undefined
, the type is more likelyBNInput
(or one of the typesBNInput
represents) as it is passed intorecoverPubKey
'smsg
argument: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a9f3af6e4416678bad8027c15627683621f532f1/types/elliptic/index.d.ts#L213Likely why the
@types/elliptic
has the type wrong is due toe
being redeclared in thecatch
statement. This PR is just to fix the redeclaration.