Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
fix: add default extension type (#296)
Browse files Browse the repository at this point in the history
Similar to the `ConnectionEncrypter` interface, specify a default type for the `Extension` so consumers uninterested in the `remoteExtensions` field can operate as before.
  • Loading branch information
achingbrain authored Oct 4, 2022
1 parent e58c55e commit ab658bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/interface-connection-encrypter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export interface ConnectionEncrypter<Extension = unknown> {
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>>
}

export interface SecuredConnection<E> {
export interface SecuredConnection<Extension = unknown> {
conn: Duplex<Uint8Array>
remoteExtensions?: E
remoteExtensions?: Extension
remotePeer: PeerId
}

0 comments on commit ab658bc

Please sign in to comment.