mirror of
https://github.com/fluencelabs/libp2p-ts
synced 2025-06-25 02:31:33 +00:00
Expand interfaces
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import blake = require('blakejs');
|
||||
import blake from 'blakejs';
|
||||
|
||||
blake.blake2bHex(new Uint8Array([1, 2, 3, 4, 5]));
|
||||
blake.blake2sHex(Buffer.from([1, 2, 3, 4, 5]));
|
||||
|
6
blakejs/index.d.ts
vendored
6
blakejs/index.d.ts
vendored
@ -14,7 +14,7 @@ type BlakeJsContext = {
|
||||
outlen: number
|
||||
};
|
||||
|
||||
interface blakejs {
|
||||
interface BlakeJs {
|
||||
blake2b: (data: Buffer | Uint8Array | string, key?: Uint8Array | null, outlen?: number) => Uint8Array,
|
||||
blake2bFinal: (context: BlakeJsContext) => Uint8Array,
|
||||
blake2bHex: (data: Buffer | Uint8Array | string, key?: Uint8Array | null, outlen?: number) => string,
|
||||
@ -27,5 +27,7 @@ interface blakejs {
|
||||
blake2sUpdate: (context: BlakeJsContext, data: Buffer | Uint8Array | string) => void
|
||||
}
|
||||
|
||||
export = blakejs;
|
||||
const blakejs: BlakeJs;
|
||||
|
||||
export default blakejs;
|
||||
}
|
||||
|
Reference in New Issue
Block a user