* 6.2.1

* CHANGELOG

* Bump static metadata

* CHANGELOG
This commit is contained in:
Jaco
2021-10-04 11:17:55 +03:00
committed by GitHub
parent 9d5fb2bf72
commit a7e824ff09
37 changed files with 329 additions and 459 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
const keys = (sub as TypeDef[]).map((def, index): string => {
const { info, lookupName, name = `unknown${index}`, type } = def;
const getter = stringUpperFirst(stringCamelCase(name.replace(' ', '_')));
const isComplex = [TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
const isComplex = [TypeDefInfo.Option, TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct
? ''
: createGetter(definitions, `as${getter}`, lookupName || (isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports, false) : type), imports);
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '6.1.3-3' };
export const packageInfo = { name: '@polkadot/typegen', version: '6.2.0' };