chore(typedoc-plugin-appium): refactors for peer review
MODIFY
packages/typedoc-plugin-appium/lib/converter/converter.ts
packages/typedoc-plugin-appium/lib/converter/converter.ts
@@ -143,7 +143,9 @@ export class CommandConverter {
propName: typeof NAME_OPTIONAL | typeof NAME_REQUIRED,
refl?: DeclarationReflectionWithReflectedType
): string[] {
- if (refl) {
+ if (!refl) {
+ return [];
+ }
const props = findChildByNameAndGuard(refl, propName, isParamsArray);
const names = props?.type.target.elements.map((el: LiteralType) => String(el.value)) ?? [];
return names.filter((name) => {
@@ -154,8 +156,6 @@ export class CommandConverter {
return true;
});
}
- return [];
- }
/**
* Gathers info about an `executeMethodMap` prop in a driver

MODIFY
packages/typedoc-plugin-appium/lib/model/reflection/utils.ts
packages/typedoc-plugin-appium/lib/model/reflection/utils.ts
* @see https://github.com/KnodesCommunity/typedoc-plugins/blob/05717565fae14357b1c4be8122f3156e1d46d332/LICENSE
*/
+import _ from 'lodash';
import {ReflectionKind} from 'typedoc';
const getHigherBitMask = () =>
@@ -21,7 +22,7 @@ export const addReflectionKind = (ns: string, name: string, value?: number | nul
const kindAny = ReflectionKind as any;
const existingValue = kindAny[fullName];
- if (existingValue !== null && existingValue !== undefined) {
+ if (_.isNil(existingValue)) {
return existingValue;
}
const defaultedValue = value ?? getHigherBitMask() * 2;

chore(typedoc-plugin-appium): refactors for peer review