export function ifIsLiteralType(this: DeclarationReflection, truthy: boolean, options: any) { const isLiteralType = this.kind === ReflectionKind.ObjectLiteral || this.kind === ReflectionKind.TypeLiteral; if (isLiteralType && truthy) { return options.fn(this); } return !isLiteralType && !truthy ? options.fn(this) : options.inverse(this); }
export function memberTitle(this: DeclarationReflection) { if (this.parent?.kindOf(ReflectionKind.Enum)) { return ''; } const md = []; let headingLevel = 3; if (!(this as any).stickToParent) { if (this.parent?.kindOf(ReflectionKind.Module)) { headingLevel = 2; if (this.kind === ReflectionKind.TypeAlias) { // headingLevel = 4; headingLevel = 3; } } } md.push(heading(headingLevel)); md.push(this.name); return md.join(' '); }
if (signature.kind !== ReflectionKind.CallSignature) { md.push(`${spaces(spaceLength)}* ${signatureTitle.call(signature, false)}\n\n`); if (signature.type instanceof ReflectionType) { if (property.kind !== ReflectionKind.TypeLiteral) { md.push(`${spaces(spaceLength)}* ${declarationTitle.call(property, false)}\n\n`); md.push(objectProperty(md, property.kind === ReflectionKind.TypeLiteral ? spaceLength : spaceLength + 2, child)); });
if (this.kind !== ReflectionKind.EnumMember) { md[md.length - 1] += ':';
if (reflection.kind === ReflectionKind.Namespace) { return namespacesNavigation; if (reflection.kind === ReflectionKind.Class) { return classesNavigation; if (reflection.kind === ReflectionKind.Enum) { return enumsNavigation; if (reflection.kind === ReflectionKind.Interface) { return interfacesNavigation;