if you provide nil for file, this code will walk to the root of the tree to find the file
(file *SourceFile)
| 1558 | |
| 1559 | // if you provide nil for file, this code will walk to the root of the tree to find the file |
| 1560 | func (node *Node) JSDoc(file *SourceFile) []*Node { |
| 1561 | if node.Flags&NodeFlagsHasJSDoc == 0 { |
| 1562 | return nil |
| 1563 | } |
| 1564 | if file == nil { |
| 1565 | file = GetSourceFileOfNode(node) |
| 1566 | if file == nil { |
| 1567 | return nil |
| 1568 | } |
| 1569 | } |
| 1570 | if file.hasLazyJSDoc { |
| 1571 | return file.resolveJSDoc(node) |
| 1572 | } |
| 1573 | return file.jsdocCache[node] |
| 1574 | } |
| 1575 | |
| 1576 | // EagerJSDoc returns JSDoc nodes that have already been parsed and cached, |
| 1577 | // without triggering lazy JSDoc parsing. |
no test coverage detected