InterfaceTypes -> keyof InterfaceRegistry (#1928)

* InterfaceTypes -> keyof InterfaceRegistry

* Renames
This commit is contained in:
Jaco Greeff
2020-02-23 13:43:37 +01:00
committed by GitHub
parent a938cb545a
commit 869f9b7af9
33 changed files with 71 additions and 82 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ interface RpcParamOptions {
}
/** @internal */
export default function createParam (name: string, type: InterfaceTypes, { isOptional = false }: RpcParamOptions = { isOptional: false }): RpcParam {
export default function createParam (name: string, type: keyof InterfaceTypes, { isOptional = false }: RpcParamOptions = { isOptional: false }): RpcParam {
return {
isOptional,
name,
+1 -1
View File
@@ -85,7 +85,7 @@ const getMetadata: RpcMethodOpt = {
params: [
createParam('at', 'BlockHash', { isOptional: true })
],
// This is not part of InterfaceTypes
// This is not part of keyof InterfaceTypes
type: 'Metadata' as any
};
+3 -3
View File
@@ -9,7 +9,7 @@ type PubSub = [string, string, string];
export interface RpcParam {
isOptional: boolean;
name: string;
type: InterfaceTypes;
type: keyof InterfaceTypes;
}
export interface RpcMethodOpt {
@@ -21,7 +21,7 @@ export interface RpcMethodOpt {
isSubscription?: boolean;
params: RpcParam[];
pubsub?: PubSub;
type: InterfaceTypes;
type: keyof InterfaceTypes;
}
export interface RpcMethod {
@@ -36,7 +36,7 @@ export interface RpcMethod {
params: RpcParam[];
pubsub: PubSub;
section: string;
type: InterfaceTypes;
type: keyof InterfaceTypes;
}
export interface RpcSection {