MCPcopy
hub / github.com/stackblitz/alien-signals / signal

Function signal

src/index.ts:140–151  ·  view source on GitHub ↗
(initialValue?: T)

Source from the content-addressed store, hash-verified

138 (value: T): void;
139};
140export function signal<T>(initialValue?: T): {
141 (): T | undefined;
142 (value: T | undefined): void;
143} {
144 return signalOper.bind({
145 currentValue: initialValue,
146 pendingValue: initialValue,
147 subs: undefined,
148 subsTail: undefined,
149 flags: ReactiveFlags.Mutable,
150 }) as () => T | undefined;
151}
152
153export function computed<T>(getter: (previousValue?: T) => T): () => T {
154 return computedOper.bind({

Callers 6

signalFunction · 0.90
effect.spec.tsFile · 0.90
trigger.spec.tsFile · 0.90
propagate.mjsFile · 0.50
memoryUsage.mjsFile · 0.50

Calls

no outgoing calls

Tested by 1

signalFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…