From df25e39c30ea448ce254524cdc8bf2e98e1cd87f Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 14 Aug 2023 17:37:13 +0100 Subject: [PATCH] feat: re-export types from @helia/interface `@helia/interface` lets us depend on the shape of a `Helia` without having to depend on `helia` directly which is useful when you are writing something lightweight and don't want to pull in libp2p etc during an `npm i`, but in some cases we will have a dep on `helia` so re-export the types from `@helia/interface` to not force people to have a dependency on both. --- packages/helia/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/helia/src/index.ts b/packages/helia/src/index.ts index 15282e68..9f78b831 100644 --- a/packages/helia/src/index.ts +++ b/packages/helia/src/index.ts @@ -37,6 +37,12 @@ import type { Libp2pOptions } from 'libp2p' import type { CID } from 'multiformats/cid' import type { MultihashHasher } from 'multiformats/hashes/interface' +// re-export interface types so people don't have to depend on @helia/interface +// if they don't want to +export * from '@helia/interface' +export * from '@helia/interface/blocks' +export * from '@helia/interface/pins' + const log = logger('helia') /**