Update @polkadot/dev with flow-types (#12)
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
instrumentation:
|
||||
root: src
|
||||
extensions:
|
||||
- .js
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// GPLv3, Copyright (C) 2017, theBlock, https://theblock.io
|
||||
// @flow
|
||||
|
||||
declare module 'bn.js' {
|
||||
declare class BN {
|
||||
constructor (value?: any, base: ?number): BN;
|
||||
|
||||
add (value?: BN): BN;
|
||||
div (value?: BN): BN;
|
||||
divRound (value?: BN): BN;
|
||||
eq (value: BN): boolean;
|
||||
gt (value: BN): boolean;
|
||||
isZero (): boolean;
|
||||
lt (value: BN): boolean;
|
||||
mul (value?: BN): BN;
|
||||
sub (value?: BN): BN;
|
||||
toNumber (): number;
|
||||
toString (base?: number, padding?: number): string;
|
||||
|
||||
static isBN (value?: any): boolean;
|
||||
}
|
||||
|
||||
declare module.exports: typeof BN;
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// ISC, Copyright 2017 Jaco Greeff
|
||||
// @flow
|
||||
|
||||
type KeccakType = 'keccak256';
|
||||
|
||||
declare module 'keccak' {
|
||||
declare module.exports: (type: KeccakType) => {
|
||||
update: (value: Buffer | string) => {
|
||||
digest: () => Buffer;
|
||||
}
|
||||
};
|
||||
}
|
||||
Generated
+1111
-92
File diff suppressed because it is too large
Load Diff
+3
-5
@@ -24,15 +24,13 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/util#readme",
|
||||
"scripts": {
|
||||
"build": "npm run build:js && npm run build:md",
|
||||
"build:js": "rimraf build && babel src --out-dir build --ignore *.spec.js",
|
||||
"build:md": "polkadot-dev-build-docs",
|
||||
"build": "polkadot-dev-build-babel && polkadot-dev-build-docs",
|
||||
"check": "eslint src && flow check",
|
||||
"test": "jest --coverage src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.2.2",
|
||||
"@polkadot/jsonrpc": "^0.3.6"
|
||||
"@polkadot/dev": "^0.2.3",
|
||||
"@polkadot/jsonrpc": "^0.3.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ module.exports = function bnToHex (value?: BN): string {
|
||||
}
|
||||
|
||||
if (!isBN(value)) {
|
||||
throw new Error(`Cannot convert from non-BN value '${value}' to hex`);
|
||||
throw new Error(`Cannot convert from non-BN value '${(value: any)}' to hex`);
|
||||
}
|
||||
|
||||
return hexAddPrefix(value.toString(16));
|
||||
|
||||
Reference in New Issue
Block a user