0.98 (#1635)
This commit is contained in:
@@ -57,9 +57,12 @@ function initType<T extends Codec = Codec, K extends string = string> (registry:
|
||||
// An unsafe version of the `createType` below. It's unsafe because the `type`
|
||||
// argument here can be any string, which, if not parseable, will yield a
|
||||
// runtime error.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function createTypeUnsafe<T extends Codec = Codec, K extends string = string> (registry: Registry, type: K, params: any[] = [], isPedantic?: boolean): T {
|
||||
try {
|
||||
return initType(registry, createClass<T, K>(registry, type), params, isPedantic);
|
||||
// Circle back to isPedenatic when it handles all cases 100% - as of now,
|
||||
// it provides false wraning which is more hinderance than help
|
||||
return initType(registry, createClass<T, K>(registry, type), params); // , isPedantic);
|
||||
} catch (error) {
|
||||
throw new Error(`createType(${type}):: ${error.message}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user