import React from 'react';
import { InlineCode } from '~/components/base/code';
import { B, P } from '~/components/base/paragraph';
import { H2, H3Code } from '~/components/plugins/Headings';
import {
CommentData,
InterfaceDefinitionData,
MethodSignatureData,
PropData,
} from '~/components/plugins/api/APIDataTypes';
import {
CommentTextBlock,
mdInlineComponents,
renderFlags,
renderParam,
renderTypeOrSignatureType,
resolveTypeName,
} from '~/components/plugins/api/APISectionUtils';
export type APISectionInterfacesProps = {
data: InterfaceDefinitionData[];
};
const renderInterfaceComment = (comment?: CommentData, signatures?: MethodSignatureData[]) => {
if (signatures && signatures.length) {
const { type, parameters, comment: signatureComment } = signatures[0];
return (
<>
{parameters?.length ? parameters.map(param => renderParam(param)) : null}
Returns:
Extends:
{extendedTypes.map(extendedType => (
| Name | Type | Description |
|---|