@@ -6,14 +6,14 @@ import { DERIVED, PROXY_PATH_SYMBOL, STATE_SYMBOL } from '#client/constants';
6
6
import { effect_tracking } from '../reactivity/effects.js' ;
7
7
import { active_reaction , captured_signals , set_captured_signals , untrack } from '../runtime.js' ;
8
8
9
- /** @type {{ reaction: Reaction | null, entries: Map<any, any > } | null } */
9
+ /** @type {{ reaction: Reaction | null, entries: Map<Value, Error[] > } | null } */
10
10
export let tracing_expressions = null ;
11
11
12
12
/**
13
- * @param { Value } signal
14
- * @param { { read: Error[] } } [entry ]
13
+ * @param {Value } signal
14
+ * @param {Error[] } [traces ]
15
15
*/
16
- function log_entry ( signal , entry ) {
16
+ function log_entry ( signal , traces = [ ] ) {
17
17
const debug = signal . debug ;
18
18
const value = signal . trace_need_increase ? signal . trace_v : signal . v ;
19
19
@@ -74,13 +74,9 @@ function log_entry(signal, entry) {
74
74
console . log ( signal . updated ) ;
75
75
}
76
76
77
- const read = entry ?. read ;
78
-
79
- if ( read && read . length > 0 ) {
80
- for ( var stack of read ) {
81
- // eslint-disable-next-line no-console
82
- console . log ( stack ) ;
83
- }
77
+ for ( var trace of traces ) {
78
+ // eslint-disable-next-line no-console
79
+ console . log ( trace ) ;
84
80
}
85
81
86
82
// eslint-disable-next-line no-console
@@ -116,8 +112,8 @@ export function trace(label, fn) {
116
112
117
113
tracing_expressions = null ;
118
114
119
- for ( const [ signal , entry ] of entries ) {
120
- log_entry ( signal , entry ) ;
115
+ for ( const [ signal , traces ] of entries ) {
116
+ log_entry ( signal , traces ) ;
121
117
}
122
118
// eslint-disable-next-line no-console
123
119
console . groupEnd ( ) ;
0 commit comments