Basic type updates

This commit is contained in:
Jaco Greeff
2018-06-22 16:01:52 +02:00
parent 2e778ceb5b
commit c0ce981b1b
7 changed files with 10 additions and 10 deletions

2
blakejs/index.d.ts vendored
View File

@ -14,7 +14,7 @@ type BlakeJsContext = {
outlen: number outlen: number
}; };
interface BlakeJs { type BlakeJs = {
blake2b: (data: Buffer | Uint8Array | string, key?: Uint8Array | null, outlen?: number) => Uint8Array, blake2b: (data: Buffer | Uint8Array | string, key?: Uint8Array | null, outlen?: number) => Uint8Array,
blake2bFinal: (context: BlakeJsContext) => Uint8Array, blake2bFinal: (context: BlakeJsContext) => Uint8Array,
blake2bHex: (data: Buffer | Uint8Array | string, key?: Uint8Array | null, outlen?: number) => string, blake2bHex: (data: Buffer | Uint8Array | string, key?: Uint8Array | null, outlen?: number) => string,

View File

@ -10,5 +10,5 @@ declare module 'libp2p-tcp' {
export class LibP2pTcp implements Transport { export class LibP2pTcp implements Transport {
} }
export = LibP2pTcp; export default LibP2pTcp;
} }

View File

@ -10,5 +10,5 @@ declare module 'libp2p-webrtc-direct' {
export class LibP2pWebRtcDirect implements Transport { export class LibP2pWebRtcDirect implements Transport {
} }
export = LibP2pWebRtcDirect; export default LibP2pWebRtcDirect;
} }

View File

@ -10,5 +10,5 @@ declare module 'libp2p-webrtc-star' {
export class LibP2pWebRtcStar implements Transport { export class LibP2pWebRtcStar implements Transport {
} }
export = LibP2pWebRtcStar; export default LibP2pWebRtcStar;
} }

View File

@ -10,5 +10,5 @@ declare module 'libp2p-websockets' {
export class LibP2pWebsockets implements Transport { export class LibP2pWebsockets implements Transport {
} }
export = LibP2pWebsockets; export default LibP2pWebsockets;
} }

2
libp2p/index.d.ts vendored
View File

@ -10,7 +10,7 @@ import Transport from 'interface-transport';
// @ts-ignore // @ts-ignore
import { Libp2pKadDHT } from 'libp2p-kad-dht'; import { Libp2pKadDHT } from 'libp2p-kad-dht';
// @ts-ignore // @ts-ignore
import LibP2pMdns from 'libp2p-mdns'; import { LibP2pMdns } from 'libp2p-mdns';
// @ts-ignore // @ts-ignore
import { LibP2pMplex } from 'libp2p-mplex'; import { LibP2pMplex } from 'libp2p-mplex';
// @ts-ignore // @ts-ignore

8
memdown/index.d.ts vendored
View File

@ -7,10 +7,6 @@
/// <reference types="node" /> /// <reference types="node" />
declare module 'memdown' { declare module 'memdown' {
export = memdown;
var memdown: memdown.Constructor;
namespace memdown { namespace memdown {
type Bytes = string | Buffer; type Bytes = string | Buffer;
type ErrCallback = (error: any) => void; type ErrCallback = (error: any) => void;
@ -145,4 +141,8 @@ namespace memdown {
type Constructor = () => MemDown; type Constructor = () => MemDown;
} }
const memdownConstrctor: memdown.Constructor;
export = memdownConstrctor;
} }