Skip to content

Commit

Permalink
feat: re-export types from @helia/interface (#232)
Browse files Browse the repository at this point in the history
`@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.
  • Loading branch information
achingbrain authored Aug 16, 2023
1 parent a33cb3e commit 09c1e47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/helia/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

/**
Expand Down

0 comments on commit 09c1e47

Please sign in to comment.