(program, sourceFile, position)
| 139908 | return undefined; |
| 139909 | } |
| 139910 | function getDefinitionAndBoundSpan(program, sourceFile, position) { |
| 139911 | var definitions = getDefinitionAtPosition(program, sourceFile, position); |
| 139912 | if (!definitions || definitions.length === 0) { |
| 139913 | return undefined; |
| 139914 | } |
| 139915 | // Check if position is on triple slash reference. |
| 139916 | var comment = findReferenceInPosition(sourceFile.referencedFiles, position) || |
| 139917 | findReferenceInPosition(sourceFile.typeReferenceDirectives, position) || |
| 139918 | findReferenceInPosition(sourceFile.libReferenceDirectives, position); |
| 139919 | if (comment) { |
| 139920 | return { definitions: definitions, textSpan: ts.createTextSpanFromRange(comment) }; |
| 139921 | } |
| 139922 | var node = ts.getTouchingPropertyName(sourceFile, position); |
| 139923 | var textSpan = ts.createTextSpan(node.getStart(), node.getWidth()); |
| 139924 | return { definitions: definitions, textSpan: textSpan }; |
| 139925 | } |
| 139926 | GoToDefinition.getDefinitionAndBoundSpan = getDefinitionAndBoundSpan; |
| 139927 | // At 'x.foo', see if the type of 'x' has an index signature, and if so find its declarations. |
| 139928 | function getDefinitionInfoForIndexSignatures(node, checker) { |
nothing calls this directly
no test coverage detected