* Gets the effective type annotation of a variable, parameter, or property. If the node was * parsed in a JavaScript file, gets the type annotation from JSDoc. Also gets the type of * functions only the JSDoc case.
(node)
| 18642 | * functions only the JSDoc case. |
| 18643 | */ |
| 18644 | function getEffectiveTypeAnnotationNode(node) { |
| 18645 | if (!isInJSFile(node) && ts.isFunctionDeclaration(node)) |
| 18646 | return undefined; |
| 18647 | var type = node.type; |
| 18648 | if (type || !isInJSFile(node)) |
| 18649 | return type; |
| 18650 | return ts.isJSDocPropertyLikeTag(node) ? node.typeExpression && node.typeExpression.type : ts.getJSDocType(node); |
| 18651 | } |
| 18652 | ts.getEffectiveTypeAnnotationNode = getEffectiveTypeAnnotationNode; |
| 18653 | function getTypeAnnotationNode(node) { |
| 18654 | return node.type; |
no test coverage detected
searching dependent graphs…