@@ -65,6 +65,15 @@ import { WrappedSignalImpl } from '../reactive-primitives/impl/wrapped-signal-im
65
65
import { SerializerSignalImpl } from '../reactive-primitives/impl/serializer-signal-impl' ;
66
66
import { AsyncComputedSignalImpl } from '../reactive-primitives/impl/async-computed-signal-impl' ;
67
67
import { isObject } from './utils/types' ;
68
+ import { qwikDebugToString } from '../debug' ;
69
+
70
+ const DEBUG = true ;
71
+
72
+ const log = ( ...args : any [ ] ) =>
73
+ console . warn (
74
+ 'SERIALIZATION' ,
75
+ ...args . map ( ( arg ) => ( arg && typeof arg === 'object' ? arg : qwikDebugToString ( arg ) ) )
76
+ ) ;
68
77
69
78
const deserializedProxyMap = new WeakMap < object , unknown [ ] > ( ) ;
70
79
@@ -175,6 +184,7 @@ export const _eagerDeserializeArray = (
175
184
for ( let i = 0 ; i < data . length ; i += 2 ) {
176
185
out [ i / 2 ] = deserializeData ( container , data [ i ] as TypeIds , data [ i + 1 ] ) ;
177
186
}
187
+ DEBUG && log ( 'eager deserialized array' , out ) ;
178
188
return out ;
179
189
} ;
180
190
@@ -271,13 +281,16 @@ const inflate = (
271
281
break ;
272
282
}
273
283
case TypeIds . Signal : {
284
+ console . log ( 'new signal' , data ) ;
274
285
const signal = target as SignalImpl < unknown > ;
275
286
const d = data as [ unknown , ...EffectSubscription [ ] ] ;
276
287
signal . $untrackedValue$ = d [ 0 ] ;
277
288
signal . $effects$ = new Set ( d . slice ( 1 ) as EffectSubscription [ ] ) ;
278
289
break ;
279
290
}
280
291
case TypeIds . WrappedSignal : {
292
+ console . log ( 'new wrappedsignal' , data ) ;
293
+
281
294
const signal = target as WrappedSignalImpl < unknown > ;
282
295
const d = data as [
283
296
number ,
@@ -298,6 +311,7 @@ const inflate = (
298
311
break ;
299
312
}
300
313
case TypeIds . AsyncComputedSignal : {
314
+ console . log ( 'new asynccomputedsignal' , data ) ;
301
315
const asyncComputed = target as AsyncComputedSignalImpl < unknown > ;
302
316
const d = data as [
303
317
AsyncComputeQRL < unknown > ,
@@ -325,6 +339,7 @@ const inflate = (
325
339
// Inflating a SerializerSignal is the same as inflating a ComputedSignal
326
340
case TypeIds . SerializerSignal :
327
341
case TypeIds . ComputedSignal : {
342
+ console . log ( 'new computedsignal' , data ) ;
328
343
const computed = target as ComputedSignalImpl < unknown > ;
329
344
const d = data as [ QRLInternal < ( ) => { } > , EffectSubscription [ ] | null , unknown ?] ;
330
345
computed . $computeQrl$ = d [ 0 ] ;
0 commit comments