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

Function getJsDocData

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

Source from the content-addressed store, hash-verified

1516}
1517
1518function getJsDocData(node) {
1519 const docs = typeof node?.getJsDocs === 'function' ? node.getJsDocs() : [];
1520 const tags = docs.flatMap(doc => doc.getTags());
1521
1522 return {
1523 description:
1524 docs.map(doc => doc.getDescription().replace(/\n+/g, ' ').trim()).find(Boolean) || '',
1525 defaultValue: tags.find(tag => tag.getTagName() === 'default')?.getCommentText() || '',
1526 selector: tags.find(tag => tag.getTagName() === 'selector')?.getCommentText() || '',
1527 deprecated: tags.some(tag => tag.getTagName() === 'deprecated'),
1528 private: tags.some(tag => tag.getTagName() === 'private')
1529 };
1530}
1531
1532function shouldOmitSymbol(sym) {
1533 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