Bump all static metadata (#3927)

* Bump all static metadata

* Build defs
This commit is contained in:
Jaco
2021-09-04 15:38:36 +02:00
committed by GitHub
parent 3e159891c0
commit a0dd50b3ba
11 changed files with 309 additions and 16 deletions
+2 -1
View File
@@ -54,7 +54,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
const keys = (sub as TypeDef[]).map((def, index): string => {
const { info, name = `unknown${index}`, type } = def;
const getter = stringUpperFirst(stringCamelCase(name.replace(' ', '_')));
const isComplex = [TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
const isComplex = [TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct
? ''
: createGetter(definitions, `as${getter}`, isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports) : type, imports);
@@ -65,6 +65,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
switch (info) {
case TypeDefInfo.Compact:
case TypeDefInfo.Plain:
case TypeDefInfo.Result:
case TypeDefInfo.Struct:
case TypeDefInfo.Tuple:
case TypeDefInfo.Vec: