These are Forma's optional compatibility classes, not native browser APIs or a claim that a TC39 proposal has shipped. Import this subpath explicitly.
Read the usage guide or all entry points.
2 exports · published 3.0.0 declarations
import { Computed } from '@getforma/core/tc39';Values and functions
Computed#
declare class Computed<T> {
constructor(fn: () => T);
get(): T;
}TC39-compatible computed value.
Equivalent to Signal.Computed in the TC39 proposal.
const count = new State(0);
const doubled = new Computed(() => count.get() * 2);
console.log(doubled.get()); // 0
count.set(5);
console.log(doubled.get()); // 10State#
declare class State<T> {
constructor(initialValue: T, options?: SignalOptions<T>);
get(): T;
set(value: T): void;
}TC39-compatible reactive state container.
Equivalent to Signal.State in the TC39 proposal.
const count = new State(0);
console.log(count.get()); // 0
count.set(1);Related declarations: SignalOptions
Other entry points
@getforma/core · @getforma/core/runtime · @getforma/core/runtime-hardened · @getforma/core/runtime-csp · @getforma/core/http · @getforma/core/storage · JSX namespace