MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getJsDocData

Function getJsDocData

packages/dev/s2-docs/scripts/generateMarkdownDocs.mjs:1506–1518  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

1504}
1505
1506function getJsDocData(node) {
1507 const docs = typeof node?.getJsDocs === 'function' ? node.getJsDocs() : [];
1508 const tags = docs.flatMap(doc => doc.getTags());
1509
1510 return {
1511 description:
1512 docs.map(doc => doc.getDescription().replace(/\n+/g, ' ').trim()).find(Boolean) || '',
1513 defaultValue: tags.find(tag => tag.getTagName() === 'default')?.getCommentText() || '',
1514 selector: tags.find(tag => tag.getTagName() === 'selector')?.getCommentText() || '',
1515 deprecated: tags.some(tag => tag.getTagName() === 'deprecated'),
1516 private: tags.some(tag => tag.getTagName() === 'private')
1517 };
1518}
1519
1520function shouldOmitSymbol(sym) {
1521 return (sym.getDeclarations?.() || []).some(decl => {

Callers 5

shouldOmitSymbolFunction · 0.85
generatePropTableFunction · 0.85
generateInterfaceTableFunction · 0.85
generateClassAPITableFunction · 0.85
generateStateTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected