From 35ad3b4fb66d37f265c3165969cb6ae826488602 Mon Sep 17 00:00:00 2001 From: leah-1ee Date: Sun, 4 Oct 2026 13:37:14 +0900 Subject: [PATCH] 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 --- typings/internalBinding/crypto.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/typings/internalBinding/crypto.d.ts b/typings/internalBinding/crypto.d.ts index 22ee303f5991..14da4e83fb46 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,