Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
TejasQ committed Nov 16, 2023
1 parent 512e8d5 commit 6f926c0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion web-client/src/lib/span/formatSpansForUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@ type Options = {
granularity?: number;
};

export function formatSpansForUi({ spans, metadata, granularity }: Options): any {
type UiSpan = {
id: string;
isProcessing: boolean;
name: string;
initiated: number;
time: number;
waterfall: string;
start: number;
slices: string[];
colorClassName: string;
children: UiSpan[];
}

export function formatSpansForUi({ spans, metadata, granularity }: Options): UiSpan[] {
const result = normalizeSpans(spans, granularity).map((span) => {
const isProcessing = span.closedAt < 0;
return {
Expand Down

0 comments on commit 6f926c0

Please sign in to comment.