Add pull-mplex

This commit is contained in:
Jaco Greeff 2019-03-01 16:57:06 +01:00
parent ee6cf1c5c2
commit 3258b36011
6 changed files with 33 additions and 2 deletions

View File

@ -12,5 +12,5 @@
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "bn.js-tests.ts"]
"files": ["index.d.ts", "libp2p-mplex-tests.ts"]
}

View File

@ -13,6 +13,7 @@
/// <reference types="libp2p-spdy"/>
/// <reference types="peer-book"/>
/// <reference types="peer-info"/>
/// <reference types="pull-mplex"/>
declare namespace LibP2p {
export type OptionsConfig = {
@ -46,7 +47,7 @@ declare namespace LibP2p {
export type OptionsModules = {
connEncryption: Array<LibP2pSecio>,
streamMuxer: Array<LibP2pMplex | LibP2pSpdy>,
streamMuxer: Array<LibP2pMplex | LibP2pSpdy | PullMplex>,
dht?: typeof LibP2pKadDht,
peerDiscovery: Array<LibP2pBootstrap | LibP2pMdns>,
transport: LibP2pTransport[]

13
types/pull-mplex/index.d.ts vendored Normal file
View File

@ -0,0 +1,13 @@
// Type definitions for pull-mplex 0.1.1
// Project: https://github.com/libp2p/pull-mplex
// Definitions by: Jaco Greeff <https://github.com/jacogr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare interface PullMplex {
}
declare module 'pull-mplex' {
const mplex: PullMplex;
export default mplex;
}

View File

View File

@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "pull-mplex-tests.ts"]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }