Skip to content

Commit

Permalink
fix(utils/crypto): fix types of crypto utility
Browse files Browse the repository at this point in the history
  • Loading branch information
EdamAme-x committed Nov 2, 2024
1 parent f3577a1 commit 126a1cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
* Crypto utility.
*/

import { JSONValue } from './types'

Check failure on line 6 in src/utils/crypto.ts

View workflow job for this annotation

GitHub Actions / Main

All imports in the declaration are only used as types. Use `import type`

type Algorithm = {
name: string
alias: string
}

type Data = string | boolean | number | object | ArrayBufferView | ArrayBuffer | ReadableStream
type Data = string | boolean | number | JSONValue | ArrayBufferView | ArrayBuffer

export const sha256 = async (data: Data): Promise<string | null> => {
const algorithm: Algorithm = { name: 'SHA-256', alias: 'sha256' }
Expand Down

0 comments on commit 126a1cf

Please sign in to comment.