schlechtenburg/packages/docgen/support/generate-lib-name.mjs

6 lines
204 B
JavaScript
Raw Normal View History

2022-03-22 22:02:56 +00:00
const getTypeParamString = (params) => `<${params.map(p => p.name).join(', ')}>`;
export default (docs) => `
## ${docs.name}${docs.typeParameters ? getTypeParamString(docs.typeParameters) : ''}
`;