Do not use subscriptions on single subs (#2378)

* Do not use subscriptions on single subs

* Apply suggestions from code review
This commit is contained in:
Jaco Greeff
2020-06-23 09:29:49 +02:00
committed by GitHub
parent 84eb806f07
commit c7315ffb74
5 changed files with 35 additions and 38 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ export class TypeRegistry implements Registry {
/**
* @description Creates an instance of a type as registered
*/
public createType <K extends keyof InterfaceTypes> (type: K, ...params: any[]): InterfaceTypes[K] {
public createType <K extends keyof InterfaceTypes> (type: K, ...params: unknown[]): InterfaceTypes[K] {
return createType(this, type, ...params);
}
+1 -1
View File
@@ -121,7 +121,7 @@ export interface Registry {
findMetaEvent (eventIndex: Uint8Array): Constructor<any>;
createClass <K extends keyof InterfaceTypes> (type: K): Constructor<InterfaceTypes[K]>;
createType <K extends keyof InterfaceTypes> (type: K, ...params: any[]): InterfaceTypes[K];
createType <K extends keyof InterfaceTypes> (type: K, ...params: unknown[]): InterfaceTypes[K];
get <T extends Codec = Codec> (name: string, withUnknown?: boolean): Constructor<T> | undefined;
getChainProperties (): ChainProperties | undefined;
getDefinition (name: string): string | undefined;