import React from 'react'; import ReactMarkdown from 'react-markdown'; import { InlineCode } from '~/components/base/code'; import { LI, UL } from '~/components/base/list'; import { H2, H3Code, H4 } from '~/components/plugins/Headings'; import { MethodDefinitionData, MethodSignatureData, PropData, } from '~/components/plugins/api/APIDataTypes'; import { CommentTextBlock, getPlatformTags, listParams, mdComponents, renderParam, resolveTypeName, } from '~/components/plugins/api/APISectionUtils'; export type APISectionMethodsProps = { data: MethodDefinitionData[]; apiName?: string; header?: string; }; export const renderMethod = ( { signatures = [] }: MethodDefinitionData | PropData, index?: number, dataLength?: number, apiName?: string, header?: string ): JSX.Element[] => signatures.map(({ name, parameters, comment, type }: MethodSignatureData) => (