Skip to content

Commit 6acb302

Browse files
niieanibbrzoska
authored andcommitted
fix: improve debugUtils
1 parent 9562afc commit 6acb302

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/v3/debugUtils.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { SpanMatcherFn } from './matchSpan'
66
import { createTraceRecording } from './recordingComputeUtils'
77
import type { SpanAndAnnotation } from './spanAnnotationTypes'
88
import type { FinalTransition, OnEnterStatePayload } from './Trace'
9+
import type { TraceRecording } from './traceRecordingTypes'
910
import type {
1011
DraftTraceContext,
1112
RelationSchemasBase,
@@ -61,14 +62,11 @@ export function getComputedResults<RelationSchemasT>(
6162
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6263
traceContext: TraceContext<any, RelationSchemasT, any>,
6364
finalTransition: FinalTransition<RelationSchemasT>,
64-
) {
65-
if (!traceContext || !finalTransition) return {}
65+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
66+
): Partial<TraceRecording<any, RelationSchemasT>> {
6667
try {
6768
const recording = createTraceRecording(traceContext, finalTransition)
68-
return {
69-
computedValues: recording.computedValues,
70-
computedSpans: recording.computedSpans,
71-
}
69+
return recording
7270
} catch {
7371
return {}
7472
}

0 commit comments

Comments
 (0)