Does the opposite of `getJSDocParameterTags`: given a JSDoc parameter, finds the parameter corresponding to it.
(node)
| 16967 | ts.getNextJSDocCommentLocation = getNextJSDocCommentLocation; |
| 16968 | /** Does the opposite of `getJSDocParameterTags`: given a JSDoc parameter, finds the parameter corresponding to it. */ |
| 16969 | function getParameterSymbolFromJSDoc(node) { |
| 16970 | if (node.symbol) { |
| 16971 | return node.symbol; |
| 16972 | } |
| 16973 | if (!ts.isIdentifier(node.name)) { |
| 16974 | return undefined; |
| 16975 | } |
| 16976 | var name = node.name.escapedText; |
| 16977 | var decl = getHostSignatureFromJSDoc(node); |
| 16978 | if (!decl) { |
| 16979 | return undefined; |
| 16980 | } |
| 16981 | var parameter = ts.find(decl.parameters, function (p) { return p.name.kind === 79 /* SyntaxKind.Identifier */ && p.name.escapedText === name; }); |
| 16982 | return parameter && parameter.symbol; |
| 16983 | } |
| 16984 | ts.getParameterSymbolFromJSDoc = getParameterSymbolFromJSDoc; |
| 16985 | function getEffectiveContainerForJSDocTemplateTag(node) { |
| 16986 | if (ts.isJSDoc(node.parent) && node.parent.tags) { |
nothing calls this directly
no test coverage detected