(symbol, state, search)
| 137648 | return result; |
| 137649 | } |
| 137650 | function getReferencesInContainerOrFiles(symbol, state, search) { |
| 137651 | // Try to get the smallest valid scope that we can limit our search to; |
| 137652 | // otherwise we'll need to search globally (i.e. include each file). |
| 137653 | var scope = getSymbolScope(symbol); |
| 137654 | if (scope) { |
| 137655 | getReferencesInContainer(scope, scope.getSourceFile(), search, state, /*addReferencesHere*/ !(ts.isSourceFile(scope) && !ts.contains(state.sourceFiles, scope))); |
| 137656 | } |
| 137657 | else { |
| 137658 | // Global search |
| 137659 | for (var _i = 0, _a = state.sourceFiles; _i < _a.length; _i++) { |
| 137660 | var sourceFile = _a[_i]; |
| 137661 | state.cancellationToken.throwIfCancellationRequested(); |
| 137662 | searchForName(sourceFile, search, state); |
| 137663 | } |
| 137664 | } |
| 137665 | } |
| 137666 | function getSpecialSearchKind(node) { |
| 137667 | switch (node.kind) { |
| 137668 | case 171 /* SyntaxKind.Constructor */: |
no test coverage detected