Update dependencies (#93)
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
// @flow
|
||||
|
||||
import type { ProviderInterface } from '@polkadot/api-provider/types';
|
||||
import type { InterfaceTypes } from '@polkadot/jsonrpc/types';
|
||||
import type { RxApiInterface } from './types';
|
||||
|
||||
const createApi = require('@polkadot/api');
|
||||
@@ -21,7 +20,7 @@ module.exports = function rxApi (provider?: ProviderInterface = createWs(default
|
||||
|
||||
return Object
|
||||
.keys(interfaces)
|
||||
.reduce((result, type: InterfaceTypes) => {
|
||||
.reduce((result, type) => {
|
||||
result[type] = createInterface(api, type);
|
||||
|
||||
return result;
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
// @flow
|
||||
|
||||
import type { ApiInterface, ApiInterface$Section } from '@polkadot/api/types';
|
||||
import type { InterfaceTypes } from '@polkadot/jsonrpc/types';
|
||||
import type { Interface$Sections } from '@polkadot/jsonrpc/types';
|
||||
import type { RxApiInterface$Section } from './types';
|
||||
|
||||
const observable = require('./observable');
|
||||
|
||||
module.exports = function createInterface (api: ApiInterface, sectionName: InterfaceTypes): RxApiInterface$Section {
|
||||
module.exports = function createInterface (api: ApiInterface, sectionName: Interface$Sections): RxApiInterface$Section {
|
||||
const section: ApiInterface$Section = api[sectionName];
|
||||
|
||||
return Object
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// of the ISC license. See the LICENSE file for details.
|
||||
// @flow
|
||||
|
||||
import type { InterfaceTypes } from '@polkadot/jsonrpc/types';
|
||||
import type { Interface$Sections } from '@polkadot/jsonrpc/types';
|
||||
|
||||
// flowlint-next-line unclear-type:off
|
||||
export type RxApiInterface$Method = (...params: Array<mixed>) => rxjs$Observable<any> | rxjs$BehaviorSubject<any>;
|
||||
@@ -14,5 +14,5 @@ export type RxApiInterface$Section = {
|
||||
|
||||
export type RxApiInterface = {
|
||||
isConnected: () => rxjs$BehaviorSubject<boolean>;
|
||||
[InterfaceTypes]: RxApiInterface$Section;
|
||||
[Interface$Sections]: RxApiInterface$Section;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user