mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-28 22:42:18 +00:00
chore: fix latest comments
This commit is contained in:
parent
5cfaf4128f
commit
ef86c87b40
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@ -14,9 +14,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
|
# - uses: gozala/typescript-error-reporter-action@v1.0.4
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
- uses: gozala/typescript-error-reporter-action@v1.0.4
|
- run: yarn aegir dep-check
|
||||||
- run: yarn aegir dep-check -- -i aegir
|
|
||||||
- uses: ipfs/aegir/actions/bundle-size@master
|
- uses: ipfs/aegir/actions/bundle-size@master
|
||||||
name: size
|
name: size
|
||||||
with:
|
with:
|
||||||
@ -35,7 +35,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: npx nyc --reporter=lcov npm run test:node -- --bail
|
- run: npx nyc --reporter=lcov aegir test -t node -- --bail
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
test-chrome:
|
test-chrome:
|
||||||
needs: check
|
needs: check
|
||||||
@ -43,11 +43,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn aegir test -t browser -t webworker
|
- run: npx aegir test -t browser -t webworker --bail
|
||||||
test-firefox:
|
test-firefox:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn aegir test -t browser -t webworker -- --browsers FirefoxHeadless
|
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless
|
27
.github/workflows/typecheck.yml
vendored
27
.github/workflows/typecheck.yml
vendored
@ -1,27 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- main
|
|
||||||
- default
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- '**'
|
|
||||||
|
|
||||||
name: Typecheck
|
|
||||||
jobs:
|
|
||||||
check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [12.x]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm install
|
|
||||||
- name: Typecheck
|
|
||||||
uses: gozala/typescript-error-reporter-action@v1.0.8
|
|
@ -20,10 +20,7 @@ const connectionSymbol = Symbol.for('@libp2p/interface-connection/connection')
|
|||||||
*
|
*
|
||||||
* @typedef {Object} ConectionStat
|
* @typedef {Object} ConectionStat
|
||||||
* @property {string} direction - connection establishment direction ("inbound" or "outbound").
|
* @property {string} direction - connection establishment direction ("inbound" or "outbound").
|
||||||
* @property {object} timeline - connection relevant events timestamp.
|
* @property {Timeline} timeline - connection relevant events timestamp.
|
||||||
* @property {number} timeline.open - connection opening timestamp.
|
|
||||||
* @property {number} [timeline.upgraded] - connection upgraded timestamp.
|
|
||||||
* @property {number} [timeline.close] - connection upgraded timestamp.
|
|
||||||
* @property {string} [multiplexer] - connection multiplexing identifier.
|
* @property {string} [multiplexer] - connection multiplexing identifier.
|
||||||
* @property {string} [encryption] - connection encryption method identifier.
|
* @property {string} [encryption] - connection encryption method identifier.
|
||||||
*
|
*
|
||||||
|
@ -3,16 +3,20 @@ import Multiaddr from 'multiaddr'
|
|||||||
import Connection from '../connection/connection'
|
import Connection from '../connection/connection'
|
||||||
import { Sink } from '../stream-muxer/types'
|
import { Sink } from '../stream-muxer/types'
|
||||||
|
|
||||||
|
export type DialOptions = {
|
||||||
|
signal?: AbortSignal
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A libp2p transport is understood as something that offers a dial and listen interface to establish connections.
|
* A libp2p transport is understood as something that offers a dial and listen interface to establish connections.
|
||||||
*/
|
*/
|
||||||
export interface Transport {
|
export interface Transport <DialOptions extends { signal?: AbortSignal }> {
|
||||||
new (upgrader: Upgrader, ...others: any): Transport; // eslint-disable-line
|
new (upgrader: Upgrader, ...others: any): Transport<DialOptions>; // eslint-disable-line
|
||||||
prototype: Transport;
|
prototype: Transport <DialOptions>;
|
||||||
/**
|
/**
|
||||||
* Dial a given multiaddr.
|
* Dial a given multiaddr.
|
||||||
*/
|
*/
|
||||||
dial(ma: Multiaddr, options?: any): Promise<Connection>;
|
dial(ma: Multiaddr, options?: DialOptions): Promise<Connection>;
|
||||||
/**
|
/**
|
||||||
* Create transport listeners.
|
* Create transport listeners.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user