import type { ApiDeclaredItem, ApiItemContainerMixin, ApiEvent } from '@discordjs/api-extractor-model'; import { Badges } from '../Badges'; import { CodeHeading } from '../CodeHeading'; import { InheritanceText } from '../InheritanceText'; import { ParameterTable } from '../ParameterTable'; import { TSDoc } from '../documentation/tsdoc/TSDoc'; export function Event({ item, inheritedFrom, }: { readonly inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined; readonly item: ApiEvent; }) { const hasSummary = Boolean(item.tsdocComment?.summarySection); return (
{item.name}
{hasSummary || inheritedFrom ? (
{item.tsdocComment ? : null} {item.parameters.length ? : null} {inheritedFrom ? : null}
) : null}
); }