signal
signal(initialValue, options?) returns a WritableSignal.
Read with get(), replace with set(value), update from the current value with
update(updater), and obtain a cached readonly view with asReadonly().
Equality defaults to Object.is; set() treats functions as data.
Signal reads performed while a component evaluates become that component’s dependencies. Pibbl-provided components also resolve signals at declared signal-valued props, style fields, and child inputs; the receiving component then owns the dependency. Pibbl never deep-unwraps arbitrary application data.
See Use signals and animation.
Related types: Signal,
WritableSignal, and
SignalOptions.
API details from source
Section titled “API details from source”
Creates a synchronous writable signal with configurable equality and an optional diagnostic name.
signal: <T>(initialValue: T, options?: SignalOptions<T>) => WritableSignal<T>Related API: signal, SignalOptions, WritableSignal.
Parameters
Section titled “Parameters”-
initialValue— Value stored before the first write. -
options— Equality comparison and optional diagnostic name. See SignalOptions.
Returns
Section titled “Returns”A writable signal holding the initial value. See WritableSignal.
See also
Section titled “See also”View source — packages/core/src/lib/signals/graph.ts:521
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Authoring, signals, and lifecycle companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Read and update signals: Use writable, readonly, and computed values with synchronous batching. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 380919b. ALPHA — NOT FOR PRODUCTION USE.