// https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/member.declaration.hbs import { useMinimalLayout } from '../hooks/useMinimalLayout'; import { useRequiredReflection } from '../hooks/useReflection'; import { escapeMdx } from '../utils/helpers'; import { Comment, hasComment } from './Comment'; import { DefaultValue } from './DefaultValue'; import { Icon } from './Icon'; import { MemberSources } from './MemberSources'; import { Parameter } from './Parameter'; import { extractDeclarationFromType, Type } from './Type'; import { TypeParameters } from './TypeParameters'; import { TypeParametersGeneric } from './TypeParametersGeneric'; export interface MemberDeclarationProps { id: number; } export function MemberDeclaration({ id }: MemberDeclarationProps) { const reflection = useRequiredReflection(id); const minimal = useMinimalLayout(); const showTypes = reflection.typeParameters && reflection.typeParameters.length > 0; const showDeclaration = !minimal && extractDeclarationFromType(reflection.type); return ( <>