Reactive APIs
    Preparing search index...
    • Creates a new, immutable signal with a constant value.

      The returned signal otherwise implements the same API as other readable signals, making it compatible with APIs that expect a ReadonlyReactive<T>.

      Example:

      const foo = constant(3);
      console.log(foo.value); // 3

      Type Parameters

      • T

      Parameters

      • value: T

      Returns ReadonlyReactive<T>