(signatureDeclarations, selectConstructors)
| 140011 | : undefined; |
| 140012 | } |
| 140013 | function getSignatureDefinition(signatureDeclarations, selectConstructors) { |
| 140014 | if (!signatureDeclarations) { |
| 140015 | return undefined; |
| 140016 | } |
| 140017 | var declarations = signatureDeclarations.filter(selectConstructors ? ts.isConstructorDeclaration : ts.isFunctionLike); |
| 140018 | var declarationsWithBody = declarations.filter(function (d) { return !!d.body; }); |
| 140019 | // declarations defined on the global scope can be defined on multiple files. Get all of them. |
| 140020 | return declarations.length |
| 140021 | ? declarationsWithBody.length !== 0 |
| 140022 | ? declarationsWithBody.map(function (x) { return createDefinitionInfo(x, typeChecker, symbol, node); }) |
| 140023 | : [createDefinitionInfo(ts.last(declarations), typeChecker, symbol, node, /*unverified*/ false, failedAliasResolution)] |
| 140024 | : undefined; |
| 140025 | } |
| 140026 | } |
| 140027 | /** Creates a DefinitionInfo from a Declaration, using the declaration's name if possible. */ |
| 140028 | function createDefinitionInfo(declaration, checker, symbol, node, unverified, failedAliasResolution) { |
no test coverage detected