(
source: Many<Accessor<unknown>> | Solid.Signal[],
options: DebugSignalOptions = {},
)
| 367 | * ``` |
| 368 | */ |
| 369 | export function debugSignals( |
| 370 | source: Many<Accessor<unknown>> | Solid.Signal[], |
| 371 | options: DebugSignalOptions = {}, |
| 372 | ): void { |
| 373 | let signals: Solid.Signal[] = [] |
| 374 | asArray(source).forEach(s => { |
| 375 | if (typeof s === 'function') signals.push.apply(signals, getFunctionSources(s)) |
| 376 | else signals.push(s) |
| 377 | }) |
| 378 | if (signals.length === 0) return console.warn('No signals were passed to debugSignals') |
| 379 | |
| 380 | // filter out already debugged signals |
| 381 | signals = signals.filter(s => !s.$debugSignal) |
| 382 | |
| 383 | if (signals.length === 1) return debugSignal(signals[0]!, options) |
| 384 | |
| 385 | if (options.logInitialValue === false) logSignalsInitialValues(signals) |
| 386 | |
| 387 | signals.forEach(signal => { |
| 388 | debugSignal(signal, { |
| 389 | ...options, |
| 390 | logInitialValue: false, |
| 391 | }) |
| 392 | }) |
| 393 | } |
| 394 | |
| 395 | /** |
| 396 | * Debug the {@link owner} signals by logging their lifecycle state to the browser console. |
no test coverage detected
searching dependent graphs…