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

Commit ab658bc

Browse files
authored
fix: add default extension type (#296)
Similar to the `ConnectionEncrypter` interface, specify a default type for the `Extension` so consumers uninterested in the `remoteExtensions` field can operate as before.
1 parent e58c55e commit ab658bc

File tree

1 file changed

+2
-2
lines changed
  • packages/interface-connection-encrypter/src

1 file changed

+2
-2
lines changed

packages/interface-connection-encrypter/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export interface ConnectionEncrypter<Extension = unknown> {
2323
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>>
2424
}
2525

26-
export interface SecuredConnection<E> {
26+
export interface SecuredConnection<Extension = unknown> {
2727
conn: Duplex<Uint8Array>
28-
remoteExtensions?: E
28+
remoteExtensions?: Extension
2929
remotePeer: PeerId
3030
}

0 commit comments

Comments
 (0)