typedoc-plugin-markdown
Version:
A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
14 lines (13 loc) • 499 B
JavaScript
import { ReflectionType } from 'typedoc';
export function typeArguments(model, options) {
return `${this.helpers.getAngleBracket('<')}${model
.map((typeArgument) => {
if (typeArgument instanceof ReflectionType) {
return this.partials.reflectionType(typeArgument, {
forceCollapse: options?.forceCollapse,
});
}
return this.partials.someType(typeArgument);
})
.join(', ')}${this.helpers.getAngleBracket('>')}`;
}