Move .isEmpty to $isEmpty (#5424)
* Move .isEmpty to $isEmpty * Adjust usages
This commit is contained in:
@@ -232,7 +232,7 @@ function addConstants ({ lookup, pallets }: MetadataLatest): string {
|
||||
description: DESC_CONSTANTS,
|
||||
sections: pallets
|
||||
.sort(sortByName)
|
||||
.filter(({ constants }) => !constants.isEmpty)
|
||||
.filter(({ constants }) => !constants.$isEmpty)
|
||||
.map(({ constants, name }) => {
|
||||
const sectionName = stringLowerFirst(name);
|
||||
|
||||
|
||||
@@ -67,10 +67,10 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
|
||||
}
|
||||
}
|
||||
} else if (isChildClass(Enum, Clazz)) {
|
||||
const { defKeys, isBasic } = new (Clazz as Constructor)(registry) as Enum;
|
||||
const { $isBasic, defKeys } = new (Clazz as Constructor)(registry) as Enum;
|
||||
const keys = defKeys.filter((v) => !v.startsWith('__Unused'));
|
||||
|
||||
if (isBasic) {
|
||||
if ($isBasic) {
|
||||
possibleTypes.push(arrayToStrType(keys), 'number');
|
||||
} else {
|
||||
// TODO We don't really want any here, these should be expanded
|
||||
|
||||
Reference in New Issue
Block a user