Commit 2eded683c52 for nodejs
commit 2eded683c52b183b20a0ccbee992bcafcc299350
Author: Seongeun Lee <selee3196@gmail.com>
Date: Thu Oct 29 17:47:51 2026 +0900
typings: share Sign and Verify handle methods
Extract SignBaseHandle for the shared init and update methods.
Preserve existing signatures and runtime behavior.
Assisted-by: Codex
Signed-off-by: leah-1ee <selee3196@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66499
Reviewed-By: Tim Perry <pimterry@gmail.com>
diff --git a/typings/internalBinding/crypto.d.ts b/typings/internalBinding/crypto.d.ts
index 3d5a9fceb2e..87aeffdf230 100644
--- a/typings/internalBinding/crypto.d.ts
+++ b/typings/internalBinding/crypto.d.ts
@@ -665,9 +665,12 @@ declare namespace InternalCryptoBinding {
setPrivateKey(key: ByteSource): void;
}
- interface SignHandle {
+ interface SignBaseHandle {
init(algorithm: string): void;
update(data: ByteSource, encoding?: string): void;
+ }
+
+ interface SignHandle extends SignBaseHandle {
sign(
...args: [
...key: PreparedAsymmetricKeyArgs,
@@ -678,9 +681,7 @@ declare namespace InternalCryptoBinding {
): Buffer;
}
- interface VerifyHandle {
- init(algorithm: string): void;
- update(data: ByteSource, encoding?: string): void;
+ interface VerifyHandle extends SignBaseHandle {
verify(
...args: [
...key: PreparedAsymmetricKeyArgs,