Expose isConnected on api (#78)

* Expose isConnected on api

* Revert isConnected & .on exposure
This commit is contained in:
Jaco Greeff
2018-04-24 10:53:18 +02:00
committed by GitHub
parent a4d37ee36a
commit e77ccd27f2
2 changed files with 1 additions and 5 deletions
+1 -3
View File
@@ -16,9 +16,7 @@ const createInterface = require('./create/interface');
module.exports = function api (provider: ProviderInterface): ApiInterface {
assert(provider && isFunction(provider.send), 'Expected Provider to API create');
const exposed: ApiInterface = {
on: provider.on
};
const exposed: ApiInterface = {};
return Object
.keys(interfaces)
-2
View File
@@ -4,7 +4,6 @@
// @flow
import type { InterfaceTypes } from '@polkadot/api-jsonrpc/types';
import type { ProviderInterface$Emitted, ProviderInterface$EmitCb } from '@polkadot/api-provider/types';
export type ApiInterface$Section$Method = {
(...params: Array<mixed>): Promise<mixed>;
@@ -16,6 +15,5 @@ export type ApiInterface$Section = {
};
export type ApiInterface = {
on: (type: ProviderInterface$Emitted, callback: ProviderInterface$EmitCb) => void,
[InterfaceTypes]: ApiInterface$Section
}