Function createSignal

  • Creates a writable Alien Signal.

    Type Parameters

    • T

      The type of the signal value.

    Parameters

    • initialValue: T

      The initial value of the signal.

    Returns IWritableSignal<T>

    The created Alien Signal.

    const countSignal = createSignal(0);
    countSignal.set(10); // sets the value to 10