Typescript-eslint 2 (#1353)

* Make a start

* More minor cleanups

* Some more cleanups

* Last round?

* Exclude build folders
This commit is contained in:
Jaco Greeff
2019-09-02 07:01:32 +02:00
committed by GitHub
parent bd5c167c14
commit 2dd7cc0e69
94 changed files with 391 additions and 324 deletions
+3 -3
View File
@@ -28,10 +28,10 @@
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/types": "^0.91.0-beta.10",
"@polkadot/util": "^1.1.1",
"@polkadot/util-crypto": "^1.1.1"
"@polkadot/util": "^1.2.0-beta.3",
"@polkadot/util-crypto": "^1.2.0-beta.3"
},
"devDependencies": {
"@polkadot/keyring": "^1.1.1"
"@polkadot/keyring": "^1.2.0-beta.3"
}
}
@@ -70,8 +70,8 @@ function createKeyDoubleMap ({ meta: { name, type } }: CreateItemFn, rawKey: Uin
const param1Encoded = u8aConcat(rawKey, createTypeUnsafe(type1, [key1]).toU8a(true));
const param1Hashed = hasher(param1Encoded);
// @ts-ignore If this fails it means the getHashers function failed - and we have much bigger issues
const param2Hashed = key2Hasher(createTypeUnsafe(type2, [key2]).toU8a(true));
// If this fails it means the getHashers function failed - and we have much bigger issues
const param2Hashed = (key2Hasher as HasherFunction)(createTypeUnsafe(type2, [key2]).toU8a(true));
// as per createKey, always add the length prefix (underlying it is Bytes)
return Compact.addLengthPrefix(u8aConcat(param1Hashed, param2Hashed));