Typescript-eslint 2 (#1353)
* Make a start * More minor cleanups * Some more cleanups * Last round? * Exclude build folders
This commit is contained in:
@@ -32,6 +32,6 @@
|
||||
"@polkadot/types": "^0.91.0-beta.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^1.1.1"
|
||||
"@polkadot/keyring": "^1.2.0-beta.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export function getHeader (api: ApiInterfaceRx): (hash: Uint8Array | string) =>
|
||||
// where rpc.chain.getHeader throws, we will land here - it can happen that
|
||||
// we supplied an invalid hash. (Due to defaults, storeage will have an
|
||||
// empty value, so only the RPC is affected). So return undefined
|
||||
of() as Observable<undefined>
|
||||
of()
|
||||
),
|
||||
drr()
|
||||
);
|
||||
|
||||
@@ -23,6 +23,7 @@ export function controllers (api: ApiInterfaceRx): () => Observable<[AccountId[]
|
||||
switchMap(([stashIds]): Observable<[AccountId[], Option<AccountId>[]]> =>
|
||||
combineLatest([
|
||||
of(stashIds),
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
api.query.staking.bonded.multi(stashIds) as Observable<Option<AccountId>[]>
|
||||
])
|
||||
),
|
||||
|
||||
@@ -8,8 +8,8 @@ import { AnyJsonObject, Constructor } from '@polkadot/types/types';
|
||||
import runtimeTypes from '@polkadot/types/interfaces/runtime/definitions';
|
||||
import { Struct } from '@polkadot/types';
|
||||
|
||||
// @ts-ignore We can ignore the properties, added via Struct.with
|
||||
const _Header: Constructor<Header> = Struct.with(runtimeTypes.types.Header);
|
||||
// We can ignore the properties, added via Struct.with
|
||||
const _Header: Constructor<Header> = Struct.with(runtimeTypes.types.Header as any) as any;
|
||||
|
||||
/**
|
||||
* @name HeaderExtended
|
||||
|
||||
@@ -9,8 +9,8 @@ import BN from 'bn.js';
|
||||
import democracyTypes from '@polkadot/types/interfaces/democracy/definitions';
|
||||
import { Struct, createType } from '@polkadot/types';
|
||||
|
||||
// @ts-ignore We can ignore the properties, added via Struct.with
|
||||
const _ReferendumInfo: Constructor<ReferendumInfo> = Struct.with(democracyTypes.types.ReferendumInfo);
|
||||
// We can ignore the properties, added via Struct.with
|
||||
const _ReferendumInfo: Constructor<ReferendumInfo> = Struct.with(democracyTypes.types.ReferendumInfo as any) as any;
|
||||
|
||||
/**
|
||||
* @name ReferendumInfoExtended
|
||||
|
||||
Reference in New Issue
Block a user