From e2dee691e95aba854a892d2507d8cd9f009bf61d Mon Sep 17 00:00:00 2001 From: Robert Kieffer Date: Mon, 4 Nov 2024 08:06:47 -1000 Subject: [PATCH] fix: revert "simplify type for v3 and v5" (#835) This reverts commit 2e09800e3000d01789ddfd688d0c21578b4b2ad7. --- src/v3.ts | 12 ++++++++++++ src/v5.ts | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/v3.ts b/src/v3.ts index 83030ca2..59864bd1 100644 --- a/src/v3.ts +++ b/src/v3.ts @@ -4,6 +4,18 @@ import v35, { DNS, URL } from './v35.js'; export { DNS, URL } from './v35.js'; +function v3( + value: string | Uint8Array, + namespace: UUIDTypes, + buf?: undefined, + offset?: number +): string; +function v3( + value: string | Uint8Array, + namespace: UUIDTypes, + buf: Uint8Array, + offset?: number +): Uint8Array; function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: Uint8Array, offset?: number) { return v35(0x30, md5, value, namespace, buf, offset); } diff --git a/src/v5.ts b/src/v5.ts index 5e5c0e10..08968198 100644 --- a/src/v5.ts +++ b/src/v5.ts @@ -4,6 +4,18 @@ import v35, { DNS, URL } from './v35.js'; export { DNS, URL } from './v35.js'; +function v5( + value: string | Uint8Array, + namespace: UUIDTypes, + buf?: undefined, + offset?: number +): string; +function v5( + value: string | Uint8Array, + namespace: UUIDTypes, + buf: Uint8Array, + offset?: number +): Uint8Array; function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: Uint8Array, offset?: number) { return v35(0x50, sha1, value, namespace, buf, offset); }