Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Dec 10, 2020
1 parent c4bb3fa commit e014fee
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/circuit/circuit/stream-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class StreamHandler {
}

/**
* @param {CircuitMessage} msg
* @param {CircuitMessage} msg
*/
end (msg) {
this.write(msg)
Expand Down
2 changes: 1 addition & 1 deletion src/circuit/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Circuit {
* @param {MuxedStream} props.stream
*/
async _onProtocol ({ connection, stream }) {
/** @type {import('./circuit/stream-handler')<CircuitRequest>} */
/** @type {import('./circuit/stream-handler')} */
const streamHandler = new StreamHandler({ stream })
const request = await streamHandler.read()

Expand Down
1 change: 1 addition & 0 deletions src/insecure/plaintext.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const protocol = '/plaintext/2.0.0'

function lpEncodeExchange (exchange) {
const pb = Exchange.encode(exchange)
// @ts-ignore lp.encode expects type type 'Buffer | BufferList', not 'Uint8Array'
return lp.encode.single(pb)
}

Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export interface CircuitMessageProto extends MessageProto<CircuitMessage> {
}
}


export type Exchange = {
id: Uint8Array
pubkey: PublicKey
Expand Down
3 changes: 1 addition & 2 deletions src/upgrader.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,8 @@ class Upgrader {
}) {
let muxer
let newStream
// eslint-disable-next-line prefer-const
/** @type {Connection} */
let connection
let connection // eslint-disable-line prefer-const

if (Muxer) {
// Create the muxer
Expand Down

0 comments on commit e014fee

Please sign in to comment.