Handle Vec<Option> in typegen (#4843)

This commit is contained in:
Jaco
2022-05-21 14:15:09 +03:00
committed by GitHub
parent d540355729
commit 99898e3310
+1 -1
View File
@@ -58,7 +58,7 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
);
possibleTypes.push(`([${subs.join(', ')}])[]`);
} else if (subDef.info === TypeDefInfo.VecFixed) {
} else if (subDef.info === TypeDefInfo.Option || subDef.info === TypeDefInfo.Vec || subDef.info === TypeDefInfo.VecFixed) {
// TODO: Add possibleTypes so imports work
} else if (subDef.info === TypeDefInfo.Struct) {
// TODO: Add possibleTypes so imports work