* Indicates whether a declaration can be treated as a constructor in a JavaScript * file.
(node)
| 76955 | * file. |
| 76956 | */ |
| 76957 | function isJSConstructor(node) { |
| 76958 | var _a; |
| 76959 | if (!node || !ts.isInJSFile(node)) { |
| 76960 | return false; |
| 76961 | } |
| 76962 | var func = ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) ? node : |
| 76963 | ts.isVariableDeclaration(node) && node.initializer && ts.isFunctionExpression(node.initializer) ? node.initializer : |
| 76964 | undefined; |
| 76965 | if (func) { |
| 76966 | // If the node has a @class tag, treat it like a constructor. |
| 76967 | if (ts.getJSDocClassTag(node)) |
| 76968 | return true; |
| 76969 | // If the symbol of the node has members, treat it like a constructor. |
| 76970 | var symbol = getSymbolOfNode(func); |
| 76971 | return !!((_a = symbol === null || symbol === void 0 ? void 0 : symbol.members) === null || _a === void 0 ? void 0 : _a.size); |
| 76972 | } |
| 76973 | return false; |
| 76974 | } |
| 76975 | function mergeJSSymbols(target, source) { |
| 76976 | var _a, _b; |
| 76977 | if (source) { |
no test coverage detected
searching dependent graphs…