From d717a4fabfcd1c07f6174c9a51e38326899da731 Mon Sep 17 00:00:00 2001 From: EdamAmex <121654029+EdamAme-x@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:03:47 +0900 Subject: [PATCH] fix(utils/crypto): fix types of crypto utility (#3614) * fix(utils/crypto): fix types of crypto utility * fix lint --- src/utils/crypto.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index 9ffb8310..68fcf8ca 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -3,12 +3,14 @@ * Crypto utility. */ +import type { JSONValue } from './types' + type Algorithm = { name: string alias: string } -type Data = string | boolean | number | object | ArrayBufferView | ArrayBuffer +type Data = string | boolean | number | JSONValue | ArrayBufferView | ArrayBuffer export const sha256 = async (data: Data): Promise => { const algorithm: Algorithm = { name: 'SHA-256', alias: 'sha256' }