From 2eb5810dec17413ef68f282e9d884bcd867f520d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 2 Sep 2023 06:43:47 -0400 Subject: [PATCH] fix: fix encodeCid overload typings --- src/cid.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/cid.ts b/src/cid.ts index eca7c39..6da2a79 100644 --- a/src/cid.ts +++ b/src/cid.ts @@ -9,8 +9,18 @@ export interface CID { hashType: number; } -export function encodeCid(hash: Uint8Array, size: bigint); -export function encodeCid(hash: string, size: bigint); +export function encodeCid( + hash: Uint8Array, + size: bigint, + type?: number, + hashType?: number, +); +export function encodeCid( + hash: string, + size: bigint, + type?: number, + hashType?: number, +); export function encodeCid( hash: any, size: bigint,