schlechtenburg/packages/docgen/support/generate-lib-name.mjs
2022-03-22 23:02:56 +01:00

6 lines
204 B
JavaScript

const getTypeParamString = (params) => `<${params.map(p => p.name).join(', ')}>`;
export default (docs) => `
## ${docs.name}${docs.typeParameters ? getTypeParamString(docs.typeParameters) : ''}
`;