Skip to content

Commit

Permalink
bug(libp2p): Export Components type for use in apps that use libp2p
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Cole committed Mar 27, 2024
1 parent d12cdce commit a99026d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/libp2p/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@

import { createLibp2pNode } from './libp2p.js'
import type { AddressManagerInit } from './address-manager/index.js'
import type { Components } from './components.js'
import type { ConnectionManagerInit } from './connection-manager/index.js'
import type { TransportManagerInit } from './transport-manager.js'
import type { Libp2p, ServiceMap, RecursivePartial, ComponentLogger, NodeInfo, ConnectionProtector, ConnectionEncrypter, ConnectionGater, ContentRouting, Metrics, PeerDiscovery, PeerId, PeerRouting, StreamMuxerFactory, Transport, PrivateKey } from '@libp2p/interface'
import type { PersistentPeerStoreInit } from '@libp2p/peer-store'
import type { DNS } from '@multiformats/dns'
import type { Datastore } from 'interface-datastore'

export type { Components } from './components.js'

export type ServiceFactoryMap<T extends Record<string, unknown> = Record<string, unknown>> = {
[Property in keyof T]: (components: Components) => T[Property]
}
Expand Down

0 comments on commit a99026d

Please sign in to comment.