InterfaceTypes -> keyof InterfaceRegistry (#1928)
* InterfaceTypes -> keyof InterfaceRegistry * Renames
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user