Skip to content

Commit b9476c5

Browse files
committed
more lint fixes
1 parent f63627a commit b9476c5

File tree

1 file changed

+25
-21
lines changed
  • src/sentry/static/sentry/app/views/organizationEventsV2/transactionView

1 file changed

+25
-21
lines changed

src/sentry/static/sentry/app/views/organizationEventsV2/transactionView/utils.tsx

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,27 @@ const normalizeTimestamps = (spanBounds: SpanBoundsType): SpanBoundsType => {
117117
return spanBounds;
118118
};
119119

120+
export enum TimestampStatus {
121+
Stable,
122+
Reversed,
123+
Equal,
124+
}
125+
126+
export const parseSpanTimestamps = (spanBounds: SpanBoundsType): TimestampStatus => {
127+
const startTimestamp: number = spanBounds.startTimestamp;
128+
const endTimestamp: number = spanBounds.endTimestamp;
129+
130+
if (startTimestamp < endTimestamp) {
131+
return TimestampStatus.Stable;
132+
}
133+
134+
if (startTimestamp === endTimestamp) {
135+
return TimestampStatus.Equal;
136+
}
137+
138+
return TimestampStatus.Reversed;
139+
};
140+
120141
export const boundsGenerator = (bounds: {
121142
traceStartTimestamp: number;
122143
traceEndTimestamp: number;
@@ -195,6 +216,10 @@ export const boundsGenerator = (bounds: {
195216
isSpanVisibleInView,
196217
};
197218
}
219+
default: {
220+
const _exhaustiveCheck: never = timestampStatus;
221+
return _exhaustiveCheck;
222+
}
198223
}
199224
};
200225
};
@@ -222,27 +247,6 @@ export const generateSpanColourPicker = () => {
222247
return pickSpanBarColour;
223248
};
224249

225-
export enum TimestampStatus {
226-
Stable,
227-
Reversed,
228-
Equal,
229-
}
230-
231-
export const parseSpanTimestamps = (spanBounds: SpanBoundsType): TimestampStatus => {
232-
const startTimestamp: number = spanBounds.startTimestamp;
233-
const endTimestamp: number = spanBounds.endTimestamp;
234-
235-
if (startTimestamp < endTimestamp) {
236-
return TimestampStatus.Stable;
237-
}
238-
239-
if (startTimestamp === endTimestamp) {
240-
return TimestampStatus.Equal;
241-
}
242-
243-
return TimestampStatus.Reversed;
244-
};
245-
246250
export type UserSelectValues = {
247251
userSelect: string | null;
248252
MozUserSelect: string | null;

0 commit comments

Comments
 (0)