aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts
diff options
context:
space:
mode:
authorphilippe-perrin-sonarsource <philippe.perrin@sonarsource.com>2022-01-27 11:06:59 +0100
committersonartech <sonartech@sonarsource.com>2022-01-27 20:03:05 +0000
commitdca8354af94e9feb46ea2312857e000aaa232372 (patch)
tree336b645749ab1fb1b1abdac19a69c70257e98b68 /server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts
parent85f744be340d8f404978341186dd77cc05584f31 (diff)
downloadsonarqube-dca8354af94e9feb46ea2312857e000aaa232372.tar.gz
sonarqube-dca8354af94e9feb46ea2312857e000aaa232372.zip
SONAR-15945 Get rid of T namespace in sonar-web
Diffstat (limited to 'server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts
index 1043bb28cf1..4d9584822ab 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts
+++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts
@@ -1,3 +1,5 @@
+import { FlowLocation, LinearIssueLocation, SourceLine, TextRange } from '../../../types/types';
+
/*
* SonarQube
* Copyright (C) 2009-2021 SonarSource SA
@@ -17,7 +19,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-export function getLinearLocations(textRange: T.TextRange | undefined): T.LinearIssueLocation[] {
+export function getLinearLocations(textRange: TextRange | undefined): LinearIssueLocation[] {
if (!textRange) {
return [];
}
@@ -34,14 +36,14 @@ export function getLinearLocations(textRange: T.TextRange | undefined): T.Linear
}
export function getSecondaryIssueLocationsForLine(
- line: T.SourceLine,
- highlightedLocations: (T.FlowLocation | undefined)[] | undefined
-): T.LinearIssueLocation[] {
+ line: SourceLine,
+ highlightedLocations: (FlowLocation | undefined)[] | undefined
+): LinearIssueLocation[] {
if (!highlightedLocations) {
return [];
}
return highlightedLocations.reduce((locations, location) => {
- const linearLocations: T.LinearIssueLocation[] = location
+ const linearLocations: LinearIssueLocation[] = location
? getLinearLocations(location.textRange)
.filter(l => l.line === line.line)
.map(l => ({