From 848e5a060e5903e2b5f66909971177b8219a3223 Mon Sep 17 00:00:00 2001 From: mbeckem Date: Thu, 7 Nov 2024 08:30:28 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20conterra?= =?UTF-8?q?/reactivity@98a579e7b2eb5ca9a0007f68452b8fb9a98a5ab9=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/functions/batch.html | 2 +- dev/functions/computed.html | 2 +- dev/functions/effect.html | 2 +- dev/functions/external.html | 2 +- dev/functions/getValue.html | 2 +- dev/functions/isReactive.html | 2 +- dev/functions/isReadonlyReactive.html | 2 +- dev/functions/nextTick.html | 2 +- dev/functions/peekValue.html | 2 +- dev/functions/reactive-1.html | 4 +- dev/functions/reactiveArray-1.html | 2 +- dev/functions/reactiveMap-1.html | 2 +- dev/functions/reactiveSet-1.html | 2 +- dev/functions/reactiveStruct.html | 2 +- dev/functions/syncEffect.html | 2 +- dev/functions/syncEffectOnce.html | 2 +- dev/functions/syncWatch.html | 4 +- dev/functions/syncWatchValue.html | 4 +- dev/functions/synchronized.html | 2 +- dev/functions/untracked.html | 2 +- dev/functions/watch.html | 4 +- dev/functions/watchValue.html | 4 +- dev/interfaces/CleanupHandle.html | 4 +- dev/interfaces/ComputedMemberType.html | 6 +- dev/interfaces/ExternalReactive.html | 12 +-- dev/interfaces/MethodMemberType.html | 6 +- dev/interfaces/PropertyMemberType.html | 8 +- dev/interfaces/Reactive.html | 10 +-- dev/interfaces/ReactiveArray.html | 84 +++++++++---------- dev/interfaces/ReactiveMap.html | 24 +++--- dev/interfaces/ReactiveOptions.html | 4 +- dev/interfaces/ReactiveSet.html | 20 ++--- dev/interfaces/ReactiveStructBuilder.html | 4 +- dev/interfaces/ReactiveStructConstructor.html | 4 +- dev/interfaces/ReadonlyReactive.html | 10 +-- dev/interfaces/ReadonlyReactiveArray.html | 70 ++++++++-------- dev/interfaces/WatchOptions.html | 6 +- dev/types/CleanupFunc.html | 2 +- dev/types/EffectCallback.html | 2 +- dev/types/EqualsFunc.html | 2 +- dev/types/ReactiveStructDefinition.html | 2 +- dev/types/ReadonlyReactiveMap.html | 2 +- dev/types/ReadonlyReactiveSet.html | 2 +- dev/types/SubscribeFunc.html | 2 +- dev/types/WatchCallback.html | 2 +- dev/types/WatchImmediateCallback.html | 2 +- 46 files changed, 172 insertions(+), 172 deletions(-) diff --git a/dev/functions/batch.html b/dev/functions/batch.html index ab53d45..7879305 100644 --- a/dev/functions/batch.html +++ b/dev/functions/batch.html @@ -7,4 +7,4 @@
const r1 = reactive(1);
const r2 = reactive(2);

// Log r1 and r2 every time they change.
syncEffect(() => {
console.log(r1.value, r2.value);
});

// Trigger multiple updates at once.
batch(() => {
// these two updates don't trigger the effect yet
r1.value = 2;
r2.value = 3;
});
// now the effect runs once
-

Type Parameters

Parameters

Returns T

+

Type Parameters

Parameters

Returns T

diff --git a/dev/functions/computed.html b/dev/functions/computed.html index d9a0699..b3b474b 100644 --- a/dev/functions/computed.html +++ b/dev/functions/computed.html @@ -10,4 +10,4 @@
const foo = reactive(1);
const doubleFoo = computed(() => foo.value * 2);
console.log(doubleFoo.value); // 2

foo.value = 2;
console.log(doubleFoo.value); // 4
-

Type Parameters

Parameters

Returns ReadonlyReactive<T>

+

Type Parameters

Parameters

Returns ReadonlyReactive<T>

diff --git a/dev/functions/effect.html b/dev/functions/effect.html index 25198e9..a8b74f2 100644 --- a/dev/functions/effect.html +++ b/dev/functions/effect.html @@ -22,4 +22,4 @@ This is done to avoid redundant executions as a result of many fine-grained changes.

If you need more control, take a look at syncEffect.

-

Parameters

Returns CleanupHandle

+

Parameters

Returns CleanupHandle

diff --git a/dev/functions/external.html b/dev/functions/external.html index c8766fe..169c6b7 100644 --- a/dev/functions/external.html +++ b/dev/functions/external.html @@ -11,4 +11,4 @@
// This example makes the state of an AbortSignal accessible as an reactive object.
const controller = new AbortController();
const signal = controller.signal;

const aborted = external(() => signal.aborted);
signal.addEventListener("abort", aborted.trigger);
console.log(aborted.value); // false

controller.abort(); // triggers the event handler registered above
console.log(aborted.value); // true

// later: unsubscribe from signal
-

Type Parameters

Parameters

Returns ExternalReactive<T>

+

Type Parameters

Parameters

Returns ExternalReactive<T>

diff --git a/dev/functions/getValue.html b/dev/functions/getValue.html index b73ea14..6baad06 100644 --- a/dev/functions/getValue.html +++ b/dev/functions/getValue.html @@ -1,4 +1,4 @@ getValue | @conterra/reactivity-core - v0.4.3
  • Returns the current .value of the given signal, or the input argument itself if it is not reactive.

    The access to .value is tracked.

    -

    Type Parameters

    • T

    Parameters

    Returns T

+

Type Parameters

Parameters

Returns T

diff --git a/dev/functions/isReactive.html b/dev/functions/isReactive.html index 5b66080..0618708 100644 --- a/dev/functions/isReactive.html +++ b/dev/functions/isReactive.html @@ -1,2 +1,2 @@ isReactive | @conterra/reactivity-core - v0.4.3
  • Returns true if maybeReactive is any kind of writable signal.

    -

    Type Parameters

    • T

    Parameters

    Returns maybeReactive is Reactive<T>

+

Type Parameters

Parameters

Returns maybeReactive is Reactive<T>

diff --git a/dev/functions/isReadonlyReactive.html b/dev/functions/isReadonlyReactive.html index d7c52b8..323a63a 100644 --- a/dev/functions/isReadonlyReactive.html +++ b/dev/functions/isReadonlyReactive.html @@ -1,2 +1,2 @@ isReadonlyReactive | @conterra/reactivity-core - v0.4.3
+

Type Parameters

Parameters

Returns maybeReactive is ReadonlyReactive<T>

diff --git a/dev/functions/nextTick.html b/dev/functions/nextTick.html index f623a76..010a097 100644 --- a/dev/functions/nextTick.html +++ b/dev/functions/nextTick.html @@ -1,3 +1,3 @@ nextTick | @conterra/reactivity-core - v0.4.3
  • Returns a promise that resolves after all currently scheduled asynchronous callbacks have executed.

    This function is useful in tests to wait for the execution of side effects triggered by an asynchronous watch or an effect.

    -

    Returns Promise<void>

+

Returns Promise<void>

diff --git a/dev/functions/peekValue.html b/dev/functions/peekValue.html index 2479c58..9a215f9 100644 --- a/dev/functions/peekValue.html +++ b/dev/functions/peekValue.html @@ -1,4 +1,4 @@ peekValue | @conterra/reactivity-core - v0.4.3
  • Returns the current .value of the given signal, or the input argument itself if it is not reactive.

    The access to .value is not tracked.

    -

    Type Parameters

    • T

    Parameters

    Returns T

+

Type Parameters

Parameters

Returns T

diff --git a/dev/functions/reactive-1.html b/dev/functions/reactive-1.html index 3b59594..6d3a70b 100644 --- a/dev/functions/reactive-1.html +++ b/dev/functions/reactive-1.html @@ -3,9 +3,9 @@
const foo = reactive<number>();
console.log(foo.value); // undefined
foo.value = 123; // updates the current value
-

Type Parameters

Returns Reactive<T | undefined>

  • Creates a new mutable signal, initialized to the given value.

    +

    Type Parameters

    • T

    Returns Reactive<T | undefined>

  • Creates a new mutable signal, initialized to the given value.

    Example:

    const foo = reactive(123);
    console.log(foo.value); // 123
    foo.value = 456; // updates the current value
    -

    Type Parameters

    • T

    Parameters

    Returns Reactive<T>

  • +

    Type Parameters

    Parameters

    Returns Reactive<T>

    diff --git a/dev/functions/reactiveArray-1.html b/dev/functions/reactiveArray-1.html index c8ec57a..e7e0861 100644 --- a/dev/functions/reactiveArray-1.html +++ b/dev/functions/reactiveArray-1.html @@ -2,4 +2,4 @@

    Type Parameters

    Parameters

    Returns ReactiveArray<T>

    // Empty
    const array1 = reactiveArray<number>();

    // With initial content
    const array2 = reactiveArray<number>([1, 2, 3]);
    -
    +
    diff --git a/dev/functions/reactiveMap-1.html b/dev/functions/reactiveMap-1.html index 53bac37..072124a 100644 --- a/dev/functions/reactiveMap-1.html +++ b/dev/functions/reactiveMap-1.html @@ -2,4 +2,4 @@

    Type Parameters

    Parameters

    Returns ReactiveMap<K, V>

    // Empty
    const map1 = reactiveMap<string, number>();

    // With initial content
    const map2 = reactiveMap<string, number>([["foo", 1], ["bar", 2]]);
    -
    +
    diff --git a/dev/functions/reactiveSet-1.html b/dev/functions/reactiveSet-1.html index eebed6a..0a07fa5 100644 --- a/dev/functions/reactiveSet-1.html +++ b/dev/functions/reactiveSet-1.html @@ -2,4 +2,4 @@

    Type Parameters

    Parameters

    Returns ReactiveSet<V>

    // Empty
    const set1 = reactiveSet<string>();

    // With initial content
    const set2 = reactiveSet<string>(["foo", "bar"]);
    -
    +
    diff --git a/dev/functions/reactiveStruct.html b/dev/functions/reactiveStruct.html index 15d4c58..1c2599a 100644 --- a/dev/functions/reactiveStruct.html +++ b/dev/functions/reactiveStruct.html @@ -62,4 +62,4 @@ All strings or symbols are allowed as property names, except for strings starting with '$'. Strings starting with '$' are reserved for future extensions.

    -

    Type Parameters

    Returns ReactiveStructBuilder<T>

    +

    Type Parameters

    Returns ReactiveStructBuilder<T>

    diff --git a/dev/functions/syncEffect.html b/dev/functions/syncEffect.html index 78d8f6b..af491c5 100644 --- a/dev/functions/syncEffect.html +++ b/dev/functions/syncEffect.html @@ -13,4 +13,4 @@
    const handle = syncEffect(() => {
    // ...
    });
    // later:
    handle.destroy();
    -

    Parameters

    Returns CleanupHandle

    +

    Parameters

    Returns CleanupHandle

    diff --git a/dev/functions/syncEffectOnce.html b/dev/functions/syncEffectOnce.html index 04709ca..f7de108 100644 --- a/dev/functions/syncEffectOnce.html +++ b/dev/functions/syncEffectOnce.html @@ -4,4 +4,4 @@ Typically, onInvalidate will be very cheap (e.g. schedule a new render).

    Note that onInvalidate will never be invoked more than once.

    Parameters

    Returns CleanupHandle

    This function is no longer needed and will be removed in a future release.

    -
    +
    diff --git a/dev/functions/syncWatch.html b/dev/functions/syncWatch.html index 14abdb7..12e6600 100644 --- a/dev/functions/syncWatch.html +++ b/dev/functions/syncWatch.html @@ -17,8 +17,8 @@

    Type Parameters

    Parameters

    Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    +
  • Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    Type Parameters

    • const Values extends readonly unknown[]

    Parameters

    Returns CleanupHandle

  • +

    Returns CleanupHandle

    diff --git a/dev/functions/syncWatchValue.html b/dev/functions/syncWatchValue.html index adc7069..ebf001a 100644 --- a/dev/functions/syncWatchValue.html +++ b/dev/functions/syncWatchValue.html @@ -17,8 +17,8 @@

    Type Parameters

    Parameters

    Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    +
  • Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    Type Parameters

    • T

    Parameters

    • selector: (() => T)

      a function that returns the value to watch.

        • (): T
        • Returns T

    • callback: WatchImmediateCallback<T>

      a function that will be executed whenever the watched value changes.

    • Optionaloptions: WatchOptions<T>

      additional options.

      -

    Returns CleanupHandle

  • +

    Returns CleanupHandle

    diff --git a/dev/functions/synchronized.html b/dev/functions/synchronized.html index ba14455..3a12d47 100644 --- a/dev/functions/synchronized.html +++ b/dev/functions/synchronized.html @@ -20,4 +20,4 @@
    import { synchronized, watchValue } from "@conterra/reactivity-core";

    const abortController = new AbortController();
    const abortSignal = abortController.signal;
    const aborted = synchronized(

    // getter which returns the current value from the foreign source
    () => abortSignal.aborted,

    // Subscribe function: Automatically called when the signal is used
    (callback) => {
    // Subscribe to changes in the AbortSignal
    abortSignal.addEventListener("abort", callback);

    // Cleanup function is called automatically when the signal is no longer used
    return () => {
    // unsubscribe from changes in the AbortSignal
    abortSignal.removeEventListener("abort", callback);
    };
    }
    );

    watchValue(
    () => aborted.value,
    (aborted) => {
    console.log("Aborted:", aborted);
    },
    {
    immediate: true
    }
    );

    setTimeout(() => {
    abortController.abort();
    }, 1000);

    // Prints:
    // Aborted: false
    // Aborted: true
    -

    Type Parameters

    Parameters

    Returns ReadonlyReactive<T>

    +

    Type Parameters

    Parameters

    Returns ReadonlyReactive<T>

    diff --git a/dev/functions/untracked.html b/dev/functions/untracked.html index b90e81b..a496834 100644 --- a/dev/functions/untracked.html +++ b/dev/functions/untracked.html @@ -2,4 +2,4 @@

    Accesses on reactive objects made inside callback will not be tracked, even if they occur inside a computed object or in an effect.

    untracked returns the value of callback().

    -

    Type Parameters

    Parameters

    Returns T

    +

    Type Parameters

    Parameters

    Returns T

    diff --git a/dev/functions/watch.html b/dev/functions/watch.html index 06ce7b7..c2ccc4a 100644 --- a/dev/functions/watch.html +++ b/dev/functions/watch.html @@ -31,8 +31,8 @@

    Type Parameters

    Parameters

    Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    +
  • Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    Type Parameters

    • const Values extends readonly unknown[]

    Parameters

    Returns CleanupHandle

  • +

    Returns CleanupHandle

    diff --git a/dev/functions/watchValue.html b/dev/functions/watchValue.html index 8795ff5..d26cad6 100644 --- a/dev/functions/watchValue.html +++ b/dev/functions/watchValue.html @@ -30,8 +30,8 @@

    Type Parameters

    Parameters

    Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    +
  • Returns CleanupHandle

  • This overload is used when immediate is not set to false.

    Type Parameters

    • T

    Parameters

    • selector: (() => T)

      a function that returns the value to watch.

        • (): T
        • Returns T

    • callback: WatchImmediateCallback<T>

      a function that will be executed whenever the watched value changed.

    • Optionaloptions: WatchOptions<T>

      additional options.

      -

    Returns CleanupHandle

  • +

    Returns CleanupHandle

    diff --git a/dev/interfaces/CleanupHandle.html b/dev/interfaces/CleanupHandle.html index 8f2411f..e4f3d19 100644 --- a/dev/interfaces/CleanupHandle.html +++ b/dev/interfaces/CleanupHandle.html @@ -1,5 +1,5 @@ CleanupHandle | @conterra/reactivity-core - v0.4.3

    A handle returned by various functions to dispose of a resource, such as a watcher or an effect.

    -
    interface CleanupHandle {
        destroy(): void;
    }

    Methods

    interface CleanupHandle {
        destroy(): void;
    }

    Methods

    Methods

    • Performs the cleanup action associated with the resource.

      -

      Returns void

    +

    Returns void

    diff --git a/dev/interfaces/ComputedMemberType.html b/dev/interfaces/ComputedMemberType.html index 341f961..115fddc 100644 --- a/dev/interfaces/ComputedMemberType.html +++ b/dev/interfaces/ComputedMemberType.html @@ -1,6 +1,6 @@ ComputedMemberType | @conterra/reactivity-core - v0.4.3

    Interface ComputedMemberType<T, V>

    A computed property of a reactive struct.

    -
    interface ComputedMemberType<T, V> {
        compute: ((this: T) => V);
        type?: "computed";
    }

    Type Parameters

    • T
    • V

    Properties

    interface ComputedMemberType<T, V> {
        compute: ((this: T) => V);
        type?: "computed";
    }

    Type Parameters

    • T
    • V

    Properties

    Properties

    compute: ((this: T) => V)

    The function to compute the value of the property.

    -
    type?: "computed"

    Type to indicate that this member is a computed property.

    -
    +
    type?: "computed"

    Type to indicate that this member is a computed property.

    +
    diff --git a/dev/interfaces/ExternalReactive.html b/dev/interfaces/ExternalReactive.html index e1e4412..3aad4ff 100644 --- a/dev/interfaces/ExternalReactive.html +++ b/dev/interfaces/ExternalReactive.html @@ -1,24 +1,24 @@ ExternalReactive | @conterra/reactivity-core - v0.4.3

    Interface ExternalReactive<T>

    A signal that holds a value from an external source.

    Instances of this type are used to integrate "foreign" state into the reactivity system.

    -
    interface ExternalReactive<T> {
        value: T;
        peek(): T;
        toJSON(): T;
        toString(): string;
        trigger(): void;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    interface ExternalReactive<T> {
        value: T;
        peek(): T;
        toJSON(): T;
        toString(): string;
        trigger(): void;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    Properties

    Methods

    • Accesses the current value without being considered a user of this value.

      Use this method if you do not wish to be notified about changes.

      -

      Returns T

    • Notifies the reactivity system that the external value has changed.

      The users of this value will be notified automatically; if there are any users then the value will be re-computed from its external source using the original callback.

      NOTE: This function is bound to its instance. You can use it directly as an event handler callback without safeguarding this.

      -

      Returns void

    Properties

    value: T

    Accesses the current value stored in this signal.

    +

    Returns void

    Properties

    value: T

    Accesses the current value stored in this signal.

    This access is tracked: users (computed signals, effects, etc.) will be registered as a user of this value and will be notified when it changes.

    -
    +
    diff --git a/dev/interfaces/MethodMemberType.html b/dev/interfaces/MethodMemberType.html index 288b79d..a1ad9ec 100644 --- a/dev/interfaces/MethodMemberType.html +++ b/dev/interfaces/MethodMemberType.html @@ -1,6 +1,6 @@ MethodMemberType | @conterra/reactivity-core - v0.4.3

    Interface MethodMemberType<T, Params, Ret>

    A method of a reactive struct.

    -
    interface MethodMemberType<T, Params, Ret> {
        method: ((this: T, ...args: Params) => Ret);
        type?: "method";
    }

    Type Parameters

    • T
    • Params extends any[]
    • Ret

    Properties

    interface MethodMemberType<T, Params, Ret> {
        method: ((this: T, ...args: Params) => Ret);
        type?: "method";
    }

    Type Parameters

    • T
    • Params extends any[]
    • Ret

    Properties

    Properties

    method: ((this: T, ...args: Params) => Ret)

    The method of the struct.

    -
    type?: "method"

    Type to indicate that this member is a method.

    -
    +
    type?: "method"

    Type to indicate that this member is a method.

    +
    diff --git a/dev/interfaces/PropertyMemberType.html b/dev/interfaces/PropertyMemberType.html index f0bb0d4..6da8fb0 100644 --- a/dev/interfaces/PropertyMemberType.html +++ b/dev/interfaces/PropertyMemberType.html @@ -1,12 +1,12 @@ PropertyMemberType | @conterra/reactivity-core - v0.4.3

    A property of a reactive struct.

    -
    interface PropertyMemberType {
        reactive?: boolean;
        type?: "property";
        writable?: boolean;
    }

    Properties

    interface PropertyMemberType {
        reactive?: boolean;
        type?: "property";
        writable?: boolean;
    }

    Properties

    reactive?: boolean

    If true the property is reactive. If false the property is not reactive. Default is true.

    -
    type?: "property"

    Type to indicate that this member is a property.

    -
    writable?: boolean

    If true the property is writable and it can be changed. +

    type?: "property"

    Type to indicate that this member is a property.

    +
    writable?: boolean

    If true the property is writable and it can be changed. If false the property is read-only. Default is true.

    -
    +
    diff --git a/dev/interfaces/Reactive.html b/dev/interfaces/Reactive.html index 324215e..641671d 100644 --- a/dev/interfaces/Reactive.html +++ b/dev/interfaces/Reactive.html @@ -1,16 +1,16 @@ Reactive | @conterra/reactivity-core - v0.4.3

    A signal that holds a mutable value.

    The value stored in this object can be changed through assignment, and all its users will be notified automatically.

    -
    interface Reactive<T> {
        value: T;
        peek(): T;
        toJSON(): T;
        toString(): string;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    interface Reactive<T> {
        value: T;
        peek(): T;
        toJSON(): T;
        toString(): string;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    Properties

    Methods

    • Accesses the current value without being considered a user of this value.

      Use this method if you do not wish to be notified about changes.

      -

      Returns T

    Properties

    value: T

    Reads or writes the current value in this reactive object.

    +

    Returns string

    Properties

    value: T

    Reads or writes the current value in this reactive object.

    +
    diff --git a/dev/interfaces/ReactiveArray.html b/dev/interfaces/ReactiveArray.html index 39f204e..1d2a03a 100644 --- a/dev/interfaces/ReactiveArray.html +++ b/dev/interfaces/ReactiveArray.html @@ -4,7 +4,7 @@ using square brackets, i.e. use array.get(i) instead of array[i] and array.set(i, v) instead of array[i] = v. Not all builtin array methods are implemented right now, but most of them are.

    Reads and writes to this array are reactive.

    -
    interface ReactiveArray<T> {
        length: number;
        at(index: number): undefined | T;
        concat(...values: T[]): ReactiveArray<T>;
        concat(...values: (T | ReadonlyReactiveArray<T> | T[])[]): ReactiveArray<T>;
        entries(): IterableIterator<[index: number, value: T], any, any>;
        every(predicate: ((value: T, index: number) => boolean)): boolean;
        filter<U>(predicate: ((value: T, index: number) => value is U)): ReactiveArray<U>;
        filter(predicate: ((value: T, index: number) => boolean)): ReactiveArray<T>;
        find<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        find(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findIndex(predicate: ((value: T, index: number) => boolean)): number;
        findLast<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        findLast(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findLastIndex(predicate: ((value: T, index: number) => boolean)): number;
        flatMap<U>(callback: ((value: T, index: number) => U | readonly U[])): ReactiveArray<U>;
        forEach(callback: ((value: T, index: number) => void)): void;
        get(index: number): undefined | T;
        getItems(): T[];
        includes(value: T, fromIndex?: number): boolean;
        indexOf(value: T, fromIndex?: number): number;
        keys(): IterableIterator<number, any, any>;
        lastIndexOf(value: T): number;
        map<U>(callback: ((value: T, index: number) => U)): ReactiveArray<U>;
        pop(): undefined | T;
        push(...values: T[]): void;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduce<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduceRight<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        set(index: number, value: T): void;
        shift(): undefined | T;
        slice(start?: number): ReactiveArray<T>;
        slice(start: number, end?: number): ReactiveArray<T>;
        some(predicate: ((value: T, index: number) => boolean)): boolean;
        sort(compare: ((a: T, b: T) => number)): void;
        splice(start: number, deleteCount?: number): T[];
        splice(start: number, deleteCount: number, ...values: T[]): T[];
        unshift(...values: T[]): void;
        values(): IterableIterator<T, any, any>;
    }

    Type Parameters

    Hierarchy (view full)

    Methods

    at +
    interface ReactiveArray<T> {
        length: number;
        at(index: number): undefined | T;
        concat(...values: T[]): ReactiveArray<T>;
        concat(...values: (T | ReadonlyReactiveArray<T> | T[])[]): ReactiveArray<T>;
        entries(): IterableIterator<[index: number, value: T], any, any>;
        every(predicate: ((value: T, index: number) => boolean)): boolean;
        filter<U>(predicate: ((value: T, index: number) => value is U)): ReactiveArray<U>;
        filter(predicate: ((value: T, index: number) => boolean)): ReactiveArray<T>;
        find<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        find(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findIndex(predicate: ((value: T, index: number) => boolean)): number;
        findLast<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        findLast(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findLastIndex(predicate: ((value: T, index: number) => boolean)): number;
        flatMap<U>(callback: ((value: T, index: number) => U | readonly U[])): ReactiveArray<U>;
        forEach(callback: ((value: T, index: number) => void)): void;
        get(index: number): undefined | T;
        getItems(): T[];
        includes(value: T, fromIndex?: number): boolean;
        indexOf(value: T, fromIndex?: number): number;
        keys(): IterableIterator<number, any, any>;
        lastIndexOf(value: T): number;
        map<U>(callback: ((value: T, index: number) => U)): ReactiveArray<U>;
        pop(): undefined | T;
        push(...values: T[]): void;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduce<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduceRight<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        set(index: number, value: T): void;
        shift(): undefined | T;
        slice(start?: number): ReactiveArray<T>;
        slice(start: number, end?: number): ReactiveArray<T>;
        some(predicate: ((value: T, index: number) => boolean)): boolean;
        sort(compare: ((a: T, b: T) => number)): void;
        splice(start: number, deleteCount?: number): T[];
        splice(start: number, deleteCount: number, ...values: T[]): T[];
        unshift(...values: T[]): void;
        values(): IterableIterator<T, any, any>;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    at concat entries every @@ -38,90 +38,90 @@

    Methods

    • Returns the item at the given index, or undefined if the index is out of bounds. You can use negative indices to address items starting from the end of the array.

      See also Array.at.

      -

      Parameters

      • index: number

      Returns undefined | T

    • Returns an iterator over the [index, value] entries in this array.

      -

      Returns IterableIterator<[index: number, value: T], any, any>

    • Returns an iterator over the [index, value] entries in this array.

      +

      Returns IterableIterator<[index: number, value: T], any, any>

    • Returns true if the predicate is satisfied for every item in this array, false otherwise.

      See also Array.every.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns boolean

    • Returns a new array where only items are retained that fulfilled the given predicate.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns boolean

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns ReactiveArray<T>

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.find.

      -

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      +

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.find.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns the index of the first item that satisfies the given predicate, -1 if no such item was found.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns the index of the first item that satisfies the given predicate, -1 if no such item was found.

      See also Array.findIndex.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns number

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns number

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.findLast.

      -

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      +

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.findLast.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns the index of the first item that satisfies the given predicate, -1 if no such item was found.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns a new array where every item has been replaced with the result of calling the given callback function. +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns number

    • Returns a new array where every item has been replaced with the result of calling the given callback function. If the callback function returns an array, the items in that array are included individually.

      See also Array.flatMap.

      -

      Type Parameters

      • U

      Parameters

      • callback: ((value: T, index: number) => U | readonly U[])
          • (value, index): U | readonly U[]
          • Parameters

            • value: T
            • index: number

            Returns U | readonly U[]

      Returns ReactiveArray<U>

    • Searches for the given value and returns true if it was found, false otherwise.

      +

      Parameters

      • callback: ((value: T, index: number) => void)
          • (value, index): void
          • Parameters

            • value: T
            • index: number

            Returns void

      Returns void

    • Removes the last item from this array and returns it, or undefined if the array was empty.

      See also Array.pop.

      -

      Returns undefined | T

    • Appends all given values to the end of this array.

      +

      Returns undefined | T

    • Calls the given callback function for all items in this array. +

      Parameters

      • Rest...values: T[]

      Returns void

    • Calls the given callback function for all items in this array. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduce.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduce.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduce.

      -

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Calls the given callback function for all items in this array, starting from the back. +

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Calls the given callback function for all items in this array, starting from the back. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduceRight.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduceRight.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduceRight.

      -

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Removes the first value from this array and returns it, or undefined if the array was empty.

      +

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Removes the first value from this array and returns it, or undefined if the array was empty.

      See also Array.shift.

      -

      Returns undefined | T

    • Returns true if at least one item satisfies the given predicate, false otherwise.

      See also Array.some.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns boolean

    • Sorts this array using the given comparison function.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns boolean

    • Sorts this array using the given comparison function.

      See also Array.sort.

      -

      Parameters

      • compare: ((a: T, b: T) => number)
          • (a, b): number
          • Parameters

            Returns number

      Returns void

    • Changes the contents of this array by removing, replacing and optionally adding new elements.

      +

      Parameters

      • compare: ((a: T, b: T) => number)
          • (a, b): number
          • Parameters

            Returns number

      Returns void

    • Changes the contents of this array by removing, replacing and optionally adding new elements.

      See also Array.splice.

      -

      Parameters

      • start: number
      • OptionaldeleteCount: number

      Returns T[]

    • Changes the contents of this array by removing, replacing and optionally adding new elements.

      +

      Parameters

      • start: number
      • OptionaldeleteCount: number

      Returns T[]

    • Changes the contents of this array by removing, replacing and optionally adding new elements.

      See also Array.splice.

      -

      Parameters

      • start: number
      • deleteCount: number
      • Rest...values: T[]

      Returns T[]

    • Appends all given values to the beginning of this array.

      +

      Parameters

      • start: number
      • deleteCount: number
      • Rest...values: T[]

      Returns T[]

    Properties

    length: number

    Returns the current number of items in this array.

    -
    +

    Parameters

    • Rest...values: T[]

    Returns void

    Properties

    length: number

    Returns the current number of items in this array.

    +
    diff --git a/dev/interfaces/ReactiveMap.html b/dev/interfaces/ReactiveMap.html index 3c4ab2e..43696a9 100644 --- a/dev/interfaces/ReactiveMap.html +++ b/dev/interfaces/ReactiveMap.html @@ -1,7 +1,7 @@ ReactiveMap | @conterra/reactivity-core - v0.4.3

    Interface ReactiveMap<K, V>

    A reactive map.

    This map interface is designed to be very similar to (but not exactly the same as) the standard JavaScript Map.

    Reads from and writes to this map are reactive.

    -
    interface ReactiveMap<K, V> {
        size: number;
        [iterator](): IterableIterator<[key: K, value: V], any, any>;
        clear(): void;
        delete(key: K): boolean;
        entries(): IterableIterator<[key: K, value: V], any, any>;
        forEach(callback: ((value: V, key: K) => void)): void;
        get(key: K): undefined | V;
        has(key: K): boolean;
        keys(): IterableIterator<K, any, any>;
        set(key: K, value: V): this;
        values(): IterableIterator<V, any, any>;
    }

    Type Parameters

    • K
    • V

    Hierarchy

    • Iterable<[key: K, value: V]>
      • ReactiveMap

    Methods

    interface ReactiveMap<K, V> {
        size: number;
        [iterator](): IterableIterator<[key: K, value: V], any, any>;
        clear(): void;
        delete(key: K): boolean;
        entries(): IterableIterator<[key: K, value: V], any, any>;
        forEach(callback: ((value: V, key: K) => void)): void;
        get(key: K): undefined | V;
        has(key: K): boolean;
        keys(): IterableIterator<K, any, any>;
        set(key: K, value: V): this;
        values(): IterableIterator<V, any, any>;
    }

    Type Parameters

    • K
    • V

    Hierarchy

    • Iterable<[key: K, value: V]>
      • ReactiveMap

    Methods

    [iterator] clear delete entries @@ -13,16 +13,16 @@ values

    Properties

    Methods

    • Returns an iterator over the [key, value] entries in this map.

      -

      Returns IterableIterator<[key: K, value: V], any, any>

    • Removes the entry for the given key. +

      Returns IterableIterator<[key: K, value: V], any, any>

    • Removes the entry for the given key. Returns true if there was such an entry, or false otherwise.

      -

      Parameters

      • key: K

      Returns boolean

    • Returns an iterator over the [key, value] entries in this map.

      -

      Returns IterableIterator<[key: K, value: V], any, any>

    • Executes the given callback for every entry of the map.

      +

      Parameters

      • key: K

      Returns boolean

    • Returns an iterator over the [key, value] entries in this map.

      +

      Returns IterableIterator<[key: K, value: V], any, any>

    • Executes the given callback for every entry of the map.

      See also Map.forEach.

      -

      Parameters

      • callback: ((value: V, key: K) => void)
          • (value, key): void
          • Parameters

            • value: V
            • key: K

            Returns void

      Returns void

    • Returns the currently associated value for the given key, or undefined if there is no such value.

      -

      Parameters

      • key: K

      Returns undefined | V

    • Returns true if the map currently has an entry for the given key, false otherwise.

      -

      Parameters

      • key: K

      Returns boolean

    • Returns an iterator over the keys in this map.

      -

      Returns IterableIterator<K, any, any>

    • Associates the given key with value.

      -

      Parameters

      • key: K
      • value: V

      Returns this

    • Returns an iterator over the values in this map.

      -

      Returns IterableIterator<V, any, any>

    Properties

    size: number

    Returns the current number of entries.

    -
    +

    Parameters

    Returns void

    Properties

    size: number

    Returns the current number of entries.

    +
    diff --git a/dev/interfaces/ReactiveOptions.html b/dev/interfaces/ReactiveOptions.html index 3ee2deb..f6c7922 100644 --- a/dev/interfaces/ReactiveOptions.html +++ b/dev/interfaces/ReactiveOptions.html @@ -1,7 +1,7 @@ ReactiveOptions | @conterra/reactivity-core - v0.4.3

    Interface ReactiveOptions<T>

    Options that can be passed when creating a new signal.

    -
    interface ReactiveOptions<T> {
        equal?: EqualsFunc<T>;
    }

    Type Parameters

    • T

    Properties

    interface ReactiveOptions<T> {
        equal?: EqualsFunc<T>;
    }

    Type Parameters

    • T

    Properties

    Properties

    equal?: EqualsFunc<T>

    Shall return true if the two values are considered equal.

    Reactive assignments using a new value equal to the current value will be ignored. By default, === is used to compare values.

    -
    +
    diff --git a/dev/interfaces/ReactiveSet.html b/dev/interfaces/ReactiveSet.html index 2de64ac..11ac150 100644 --- a/dev/interfaces/ReactiveSet.html +++ b/dev/interfaces/ReactiveSet.html @@ -1,7 +1,7 @@ ReactiveSet | @conterra/reactivity-core - v0.4.3

    Interface ReactiveSet<V>

    A reactive set.

    This set interface is designed to be very similar to (but not exactly the same as) the standard JavaScript Set.

    Reads from and writes to this set are reactive.

    -
    interface ReactiveSet<V> {
        size: number;
        [iterator](): IterableIterator<V, any, any>;
        add(value: V): this;
        clear(): void;
        delete(value: V): boolean;
        entries(): IterableIterator<[value: V, value: V], any, any>;
        forEach(callback: ((value: V, key: V) => void)): void;
        has(value: V): boolean;
        values(): IterableIterator<V, any, any>;
    }

    Type Parameters

    • V

    Hierarchy

    • Iterable<V>
      • ReactiveSet

    Methods

    interface ReactiveSet<V> {
        size: number;
        [iterator](): IterableIterator<V, any, any>;
        add(value: V): this;
        clear(): void;
        delete(value: V): boolean;
        entries(): IterableIterator<[value: V, value: V], any, any>;
        forEach(callback: ((value: V, key: V) => void)): void;
        has(value: V): boolean;
        values(): IterableIterator<V, any, any>;
    }

    Type Parameters

    • V

    Hierarchy

    • Iterable<V>
      • ReactiveSet

    Methods

    [iterator] add clear delete @@ -11,17 +11,17 @@ values

    Properties

    Methods

    • Returns an iterator over the values in this set.

      -

      Returns IterableIterator<V, any, any>

    • Adds the given value to the set.

      -

      Parameters

      • value: V

      Returns this

    • Removes the given value from this set. +

      Returns IterableIterator<V, any, any>

    • Adds the given value to the set.

      +

      Parameters

      • value: V

      Returns this

    • Removes the given value from this set. Returns true if value was a previously in this set, or false otherwise.

      -

      Parameters

      • value: V

      Returns boolean

    • Returns an iterator over the [value, value] entries in this set.

      +

      Parameters

      • value: V

      Returns boolean

    • Returns an iterator over the [value, value] entries in this set.

      NOTE: This is actually in the JS Standard..

      -

      Returns IterableIterator<[value: V, value: V], any, any>

    • Executes the given callback for every entry of the set.

      +

      Returns IterableIterator<[value: V, value: V], any, any>

    • Executes the given callback for every entry of the set.

      See also Set.forEach.

      -

      Parameters

      • callback: ((value: V, key: V) => void)
          • (value, key): void
          • Parameters

            • value: V
            • key: V

            Returns void

      Returns void

    • Returns true if the set currently contains the given value, false otherwise.

      -

      Parameters

      • value: V

      Returns boolean

    • Returns an iterator over the values in this set.

      -

      Returns IterableIterator<V, any, any>

    Properties

    size: number

    Returns the current number of entries.

    -
    +

    Parameters

    Returns void

    Properties

    size: number

    Returns the current number of entries.

    +
    diff --git a/dev/interfaces/ReactiveStructBuilder.html b/dev/interfaces/ReactiveStructBuilder.html index 6a88978..a9213ef 100644 --- a/dev/interfaces/ReactiveStructBuilder.html +++ b/dev/interfaces/ReactiveStructBuilder.html @@ -1,4 +1,4 @@ ReactiveStructBuilder | @conterra/reactivity-core - v0.4.3

    Interface ReactiveStructBuilder<T>

    Used to build reactive structs using a struct definition.

    -
    interface ReactiveStructBuilder<T> {
        define<const Def>(def: Def): ReactiveStructConstructor<T, Def>;
    }

    Type Parameters

    • T

    Methods

    interface ReactiveStructBuilder<T> {
        define<const Def>(def: Def): ReactiveStructConstructor<T, Def>;
    }

    Type Parameters

    • T

    Methods

    Methods

    +

    Type Parameters

    Parameters

    Returns ReactiveStructConstructor<T, Def>

    diff --git a/dev/interfaces/ReactiveStructConstructor.html b/dev/interfaces/ReactiveStructConstructor.html index 60e2b43..5c0ac7c 100644 --- a/dev/interfaces/ReactiveStructConstructor.html +++ b/dev/interfaces/ReactiveStructConstructor.html @@ -1,6 +1,6 @@ ReactiveStructConstructor | @conterra/reactivity-core - v0.4.3

    Interface ReactiveStructConstructor<T, Def>

    Constructor for reactive struct instances reactiveStruct.

    interface ReactiveStructConstructor<T, Def> {
        new ReactiveStructConstructornew (...args: ConstructorArgs<ConstructorProps<PropertyMembers<T, Def>>>): T;
    }

    Type Parameters

    • T

      The type of the struct.

    • Def

      The definition of the struct.

      -

    Constructors

    Constructors

    Constructors

    • Creates a new reactive struct instance.

      -

      Parameters

      • Rest...args: ConstructorArgs<ConstructorProps<PropertyMembers<T, Def>>>

      Returns T

    +

    Parameters

    Returns T

    diff --git a/dev/interfaces/ReadonlyReactive.html b/dev/interfaces/ReadonlyReactive.html index 22fcdd5..4e42c59 100644 --- a/dev/interfaces/ReadonlyReactive.html +++ b/dev/interfaces/ReadonlyReactive.html @@ -1,17 +1,17 @@ ReadonlyReactive | @conterra/reactivity-core - v0.4.3

    Interface ReadonlyReactive<T>

    A signal that holds a reactive value.

    When the value changes, all users of that value (computed signals, effects, watchers) are notified automatically.

    -
    interface ReadonlyReactive<T> {
        value: T;
        peek(): T;
        toJSON(): T;
        toString(): string;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    interface ReadonlyReactive<T> {
        value: T;
        peek(): T;
        toJSON(): T;
        toString(): string;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    Properties

    Methods

    • Accesses the current value without being considered a user of this value.

      Use this method if you do not wish to be notified about changes.

      -

      Returns T

    • Same as .value.

      For compatibility with builtin JS constructs.

      -

      Returns T

    • Formats .value as a string.

      +

      Returns T

    • Formats .value as a string.

      For compatibility with builtin JS constructs.

      -

      Returns string

    Properties

    value: T

    Accesses the current value stored in this signal.

    +

    Returns string

    Properties

    value: T

    Accesses the current value stored in this signal.

    This access is tracked: users (computed signals, effects, etc.) will be registered as a user of this value and will be notified when it changes.

    -
    +
    diff --git a/dev/interfaces/ReadonlyReactiveArray.html b/dev/interfaces/ReadonlyReactiveArray.html index fbcce4d..b0c1766 100644 --- a/dev/interfaces/ReadonlyReactiveArray.html +++ b/dev/interfaces/ReadonlyReactiveArray.html @@ -1,6 +1,6 @@ ReadonlyReactiveArray | @conterra/reactivity-core - v0.4.3

    Interface ReadonlyReactiveArray<T>

    Reactive array interface without modifying methods.

    See also ReactiveArray.

    -
    interface ReadonlyReactiveArray<T> {
        length: number;
        at(index: number): undefined | T;
        concat(...values: T[]): ReactiveArray<T>;
        concat(...values: (ReadonlyReactiveArray<T> | T | T[])[]): ReactiveArray<T>;
        entries(): IterableIterator<[index: number, value: T], any, any>;
        every(predicate: ((value: T, index: number) => boolean)): boolean;
        filter<U>(predicate: ((value: T, index: number) => value is U)): ReactiveArray<U>;
        filter(predicate: ((value: T, index: number) => boolean)): ReactiveArray<T>;
        find<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        find(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findIndex(predicate: ((value: T, index: number) => boolean)): number;
        findLast<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        findLast(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findLastIndex(predicate: ((value: T, index: number) => boolean)): number;
        flatMap<U>(callback: ((value: T, index: number) => U | readonly U[])): ReactiveArray<U>;
        forEach(callback: ((value: T, index: number) => void)): void;
        get(index: number): undefined | T;
        getItems(): T[];
        includes(value: T, fromIndex?: number): boolean;
        indexOf(value: T, fromIndex?: number): number;
        keys(): IterableIterator<number, any, any>;
        lastIndexOf(value: T): number;
        map<U>(callback: ((value: T, index: number) => U)): ReactiveArray<U>;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduce<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduceRight<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        set(index: number, value: T): void;
        slice(start?: number): ReactiveArray<T>;
        slice(start: number, end?: number): ReactiveArray<T>;
        some(predicate: ((value: T, index: number) => boolean)): boolean;
        values(): IterableIterator<T, any, any>;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    at +
    interface ReadonlyReactiveArray<T> {
        length: number;
        at(index: number): undefined | T;
        concat(...values: T[]): ReactiveArray<T>;
        concat(...values: (ReadonlyReactiveArray<T> | T | T[])[]): ReactiveArray<T>;
        entries(): IterableIterator<[index: number, value: T], any, any>;
        every(predicate: ((value: T, index: number) => boolean)): boolean;
        filter<U>(predicate: ((value: T, index: number) => value is U)): ReactiveArray<U>;
        filter(predicate: ((value: T, index: number) => boolean)): ReactiveArray<T>;
        find<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        find(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findIndex(predicate: ((value: T, index: number) => boolean)): number;
        findLast<U>(predicate: ((value: T, index: number) => value is U)): undefined | U;
        findLast(predicate: ((value: T, index: number) => boolean)): undefined | T;
        findLastIndex(predicate: ((value: T, index: number) => boolean)): number;
        flatMap<U>(callback: ((value: T, index: number) => U | readonly U[])): ReactiveArray<U>;
        forEach(callback: ((value: T, index: number) => void)): void;
        get(index: number): undefined | T;
        getItems(): T[];
        includes(value: T, fromIndex?: number): boolean;
        indexOf(value: T, fromIndex?: number): number;
        keys(): IterableIterator<number, any, any>;
        lastIndexOf(value: T): number;
        map<U>(callback: ((value: T, index: number) => U)): ReactiveArray<U>;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduce(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduce<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)): T;
        reduceRight(callback: ((previousValue: T, currentValue: T, currentIndex: number) => T), initialValue: T): T;
        reduceRight<U>(callback: ((previousValue: U, currentValue: T, currentIndex: number) => U), initialValue: U): U;
        set(index: number, value: T): void;
        slice(start?: number): ReactiveArray<T>;
        slice(start: number, end?: number): ReactiveArray<T>;
        some(predicate: ((value: T, index: number) => boolean)): boolean;
        values(): IterableIterator<T, any, any>;
    }

    Type Parameters

    • T

    Hierarchy (view full)

    Methods

    at concat entries every @@ -28,76 +28,76 @@

    Methods

    • Returns the item at the given index, or undefined if the index is out of bounds. You can use negative indices to address items starting from the end of the array.

      See also Array.at.

      -

      Parameters

      • index: number

      Returns undefined | T

    • Returns a new array with values concatenated to the end of the current content.

      +

      Parameters

      • index: number

      Returns undefined | T

    • Returns an iterator over the [index, value] entries in this array.

      -

      Returns IterableIterator<[index: number, value: T], any, any>

    • Returns an iterator over the [index, value] entries in this array.

      +

      Returns IterableIterator<[index: number, value: T], any, any>

    • Returns true if the predicate is satisfied for every item in this array, false otherwise.

      See also Array.every.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns boolean

    • Returns a new array where only items are retained that fulfilled the given predicate.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns boolean

    • Returns a new array where only items are retained that fulfilled the given predicate.

      See also Array.filter.

      -

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns ReactiveArray<U>

    • Returns a new array where only items are retained that fulfilled the given predicate.

      +

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns ReactiveArray<U>

    • Returns a new array where only items are retained that fulfilled the given predicate.

      See also Array.filter.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns ReactiveArray<T>

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns ReactiveArray<T>

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.find.

      -

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      +

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the first item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.find.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns the index of the first item that satisfies the given predicate, -1 if no such item was found.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns the index of the first item that satisfies the given predicate, -1 if no such item was found.

      See also Array.findIndex.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns number

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns number

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.findLast.

      -

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      +

      Type Parameters

      • U

      Parameters

      • predicate: ((value: T, index: number) => value is U)
          • (value, index): value is U
          • Parameters

            • value: T
            • index: number

            Returns value is U

      Returns undefined | U

    • Returns the last item that satisfies the given predicate, or undefined if there is no such item.

      See also Array.findLast.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns the index of the first item that satisfies the given predicate, -1 if no such item was found.

      +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns undefined | T

    • Returns the index of the first item that satisfies the given predicate, -1 if no such item was found.

      See also Array.findLastIndex.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns number

    • Returns a new array where every item has been replaced with the result of calling the given callback function. +

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns number

    • Returns a new array where every item has been replaced with the result of calling the given callback function. If the callback function returns an array, the items in that array are included individually.

      See also Array.flatMap.

      -

      Type Parameters

      • U

      Parameters

      • callback: ((value: T, index: number) => U | readonly U[])
          • (value, index): U | readonly U[]
          • Parameters

            • value: T
            • index: number

            Returns U | readonly U[]

      Returns ReactiveArray<U>

    • Executes the given callback for every item in the array.

      +

      Type Parameters

      • U

      Parameters

      • callback: ((value: T, index: number) => U | readonly U[])
          • (value, index): U | readonly U[]
          • Parameters

            • value: T
            • index: number

            Returns U | readonly U[]

      Returns ReactiveArray<U>

    • Executes the given callback for every item in the array.

      See also Array.forEach.

      -

      Parameters

      • callback: ((value: T, index: number) => void)
          • (value, index): void
          • Parameters

            • value: T
            • index: number

            Returns void

      Returns void

    • Returns the item at the given index, or undefined if the index is out of bounds.

      -

      Parameters

      • index: number

      Returns undefined | T

    • Returns a new, non-reactive array with this array's current content.

      -

      Returns T[]

    • Searches for the given value and returns true if it was found, false otherwise.

      +

      Parameters

      • callback: ((value: T, index: number) => void)
          • (value, index): void
          • Parameters

            • value: T
            • index: number

            Returns void

      Returns void

    • Returns the item at the given index, or undefined if the index is out of bounds.

      +

      Parameters

      • index: number

      Returns undefined | T

    • Returns a new, non-reactive array with this array's current content.

      +

      Returns T[]

    • Searches for the given value and returns true if it was found, false otherwise.

      See also Array.includes.

      -

      Parameters

      • value: T
      • OptionalfromIndex: number

      Returns boolean

    • Searches for the given value and returns its index, or -1 if it was not found.

      +

      Parameters

      • value: T
      • OptionalfromIndex: number

      Returns boolean

    • Searches for the given value and returns its index, or -1 if it was not found.

      See also Array.indexOf.

      -

      Parameters

      • value: T
      • OptionalfromIndex: number

      Returns number

    • Returns an iterator over the indices in this array.

      -

      Returns IterableIterator<number, any, any>

    • Searches backwards for the given value and returns its index, or -1 if it was not found.

      +

      Parameters

      • value: T
      • OptionalfromIndex: number

      Returns number

    • Returns an iterator over the indices in this array.

      +

      Returns IterableIterator<number, any, any>

    • Searches backwards for the given value and returns its index, or -1 if it was not found.

      See also Array.lastIndexOf.

      -

      Parameters

      • value: T

      Returns number

    • Returns a new array where every item has been replaced with the result of calling the given callback function.

      +

      Parameters

      • value: T

      Returns number

    • Returns a new array where every item has been replaced with the result of calling the given callback function.

      See also Array.map.

      -

      Type Parameters

      • U

      Parameters

      • callback: ((value: T, index: number) => U)
          • (value, index): U
          • Parameters

            • value: T
            • index: number

            Returns U

      Returns ReactiveArray<U>

    • Calls the given callback function for all items in this array. +

      Type Parameters

      • U

      Parameters

      • callback: ((value: T, index: number) => U)
          • (value, index): U
          • Parameters

            • value: T
            • index: number

            Returns U

      Returns ReactiveArray<U>

    • Calls the given callback function for all items in this array. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduce.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduce.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduce.

      -

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Calls the given callback function for all items in this array, starting from the back. +

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Calls the given callback function for all items in this array, starting from the back. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduceRight.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduceRight.

      -

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. +

      Parameters

      • callback: ((previousValue: T, currentValue: T, currentIndex: number) => T)
          • (previousValue, currentValue, currentIndex): T
          • Parameters

            • previousValue: T
            • currentValue: T
            • currentIndex: number

            Returns T

      • initialValue: T

      Returns T

    • Calls the given callback function for all items in this array, starting from the back. The return value of the previous callback invocation is passed in the next call. The final result of the callback will be returned from this function.

      See also Array.reduceRight.

      -

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Sets the item at the given index to value.

      -

      Parameters

      • index: number
      • value: T

      Returns void

    • Returns a shallow copy of this array.

      +

      Type Parameters

      • U

      Parameters

      • callback: ((previousValue: U, currentValue: T, currentIndex: number) => U)
          • (previousValue, currentValue, currentIndex): U
          • Parameters

            • previousValue: U
            • currentValue: T
            • currentIndex: number

            Returns U

      • initialValue: U

      Returns U

    • Sets the item at the given index to value.

      +

      Parameters

      • index: number
      • value: T

      Returns void

    • Returns true if at least one item satisfies the given predicate, false otherwise.

      +

      Parameters

      • start: number
      • Optionalend: number

      Returns ReactiveArray<T>

    • Returns true if at least one item satisfies the given predicate, false otherwise.

      See also Array.some.

      -

      Parameters

      • predicate: ((value: T, index: number) => boolean)
          • (value, index): boolean
          • Parameters

            • value: T
            • index: number

            Returns boolean

      Returns boolean

    • Returns an iterator over the items in this array.

      -

      Returns IterableIterator<T, any, any>

    Properties

    length: number

    Returns the current number of items in this array.

    -
    +

    Parameters

    Returns boolean

    Properties

    length: number

    Returns the current number of items in this array.

    +
    diff --git a/dev/interfaces/WatchOptions.html b/dev/interfaces/WatchOptions.html index f21b1ab..59e4ade 100644 --- a/dev/interfaces/WatchOptions.html +++ b/dev/interfaces/WatchOptions.html @@ -1,11 +1,11 @@ WatchOptions | @conterra/reactivity-core - v0.4.3

    Interface WatchOptions<T>

    Options that can be passed to syncWatch.

    -
    interface WatchOptions<T> {
        immediate?: boolean;
        equal?(prev: T, next: T): boolean;
    }

    Type Parameters

    • T

    Methods

    interface WatchOptions<T> {
        immediate?: boolean;
        equal?(prev: T, next: T): boolean;
    }

    Type Parameters

    • T

    Methods

    Properties

    Methods

    • A function that returns true if the two values are considered equal. If this function is provided, the watch callback will only be triggered if this function returns false.

      By default, an implementation based on object identity is used.

      -

      Parameters

      • prev: T
      • next: T

      Returns boolean

    Properties

    immediate?: boolean

    Whether to call the watch callback once during setup (default: false).

    +

    Parameters

    • prev: T
    • next: T

    Returns boolean

    Properties

    immediate?: boolean

    Whether to call the watch callback once during setup (default: false).

    If this is false, the watch callback will only be invoked after at least a single value changed.

    If this is true, the callback will fire immediately.

    -
    +
    diff --git a/dev/types/CleanupFunc.html b/dev/types/CleanupFunc.html index fc07551..9452f48 100644 --- a/dev/types/CleanupFunc.html +++ b/dev/types/CleanupFunc.html @@ -1,4 +1,4 @@ CleanupFunc | @conterra/reactivity-core - v0.4.3
    CleanupFunc: (() => void)

    A cleanup function returned from an effect or a watch callback.

    This function will be invoked before the effect or watch callback is triggered again, or when it is being disposed.

    -
    +
    diff --git a/dev/types/EffectCallback.html b/dev/types/EffectCallback.html index cba693d..05f8044 100644 --- a/dev/types/EffectCallback.html +++ b/dev/types/EffectCallback.html @@ -3,4 +3,4 @@ dependencies change, the effect will be triggered again.

    An effect may return a cleanup function that will be executed before the effect is triggered again, or when the effect is being destroyed.

    -
    +
    diff --git a/dev/types/EqualsFunc.html b/dev/types/EqualsFunc.html index 77c3fb6..0d18607 100644 --- a/dev/types/EqualsFunc.html +++ b/dev/types/EqualsFunc.html @@ -1,2 +1,2 @@ EqualsFunc | @conterra/reactivity-core - v0.4.3

    Type Alias EqualsFunc<T>

    EqualsFunc<T>: ((a: T, b: T) => boolean)

    A function that shall return true if a and b are considered equal, false otherwise.

    -

    Type Parameters

    • T
    +

    Type Parameters

    diff --git a/dev/types/ReactiveStructDefinition.html b/dev/types/ReactiveStructDefinition.html index 6551433..21e3b82 100644 --- a/dev/types/ReactiveStructDefinition.html +++ b/dev/types/ReactiveStructDefinition.html @@ -1,4 +1,4 @@ ReactiveStructDefinition | @conterra/reactivity-core - v0.4.3

    Type Alias ReactiveStructDefinition<T>

    ReactiveStructDefinition<T>: {
        [key in keyof T]-?: GetMemberSchemaForProp<T, T[key]>
    }

    Definition of a reactive struct. All properties of T must be part of the definition.

    Type Parameters

    • T

      The type of the struct.

      -
    +
    diff --git a/dev/types/ReadonlyReactiveMap.html b/dev/types/ReadonlyReactiveMap.html index d58a60c..8326760 100644 --- a/dev/types/ReadonlyReactiveMap.html +++ b/dev/types/ReadonlyReactiveMap.html @@ -1,3 +1,3 @@ ReadonlyReactiveMap | @conterra/reactivity-core - v0.4.3

    Type Alias ReadonlyReactiveMap<K, V>

    ReadonlyReactiveMap<K, V>: Omit<ReactiveMap<K, V>, "set" | "delete" | "clear">

    Reactive map interface without modifying methods.

    See also ReactiveMap.

    -

    Type Parameters

    • K
    • V
    +

    Type Parameters

    diff --git a/dev/types/ReadonlyReactiveSet.html b/dev/types/ReadonlyReactiveSet.html index b78fead..b50fcc3 100644 --- a/dev/types/ReadonlyReactiveSet.html +++ b/dev/types/ReadonlyReactiveSet.html @@ -1,3 +1,3 @@ ReadonlyReactiveSet | @conterra/reactivity-core - v0.4.3

    Type Alias ReadonlyReactiveSet<K>

    ReadonlyReactiveSet<K>: Omit<ReactiveSet<K>, "add" | "delete" | "clear">

    Reactive set interface without modifying methods.

    See also ReactiveSet.

    -

    Type Parameters

    • K
    +

    Type Parameters

    diff --git a/dev/types/SubscribeFunc.html b/dev/types/SubscribeFunc.html index a722e82..b31b6f6 100644 --- a/dev/types/SubscribeFunc.html +++ b/dev/types/SubscribeFunc.html @@ -1,4 +1,4 @@ SubscribeFunc | @conterra/reactivity-core - v0.4.3
    SubscribeFunc: ((callback: (() => void)) => CleanupFunc)

    A function that can subscribe to some external data source (e.g. DOM APIs) for updates.

    The function must register the callback to be called whenever the data source changes. The function should return a cleanup function that de-registers the callback again.

    -
    +
    diff --git a/dev/types/WatchCallback.html b/dev/types/WatchCallback.html index 013d4a1..b1f64bf 100644 --- a/dev/types/WatchCallback.html +++ b/dev/types/WatchCallback.html @@ -4,4 +4,4 @@

    The body of a watch statement is not tracked.

    A watch callback may return a cleanup function that will be executed before the callback is triggered again, or when the watch is being destroyed.

    -

    Type Parameters

    +

    Type Parameters

    diff --git a/dev/types/WatchImmediateCallback.html b/dev/types/WatchImmediateCallback.html index 989573e..cb39c3b 100644 --- a/dev/types/WatchImmediateCallback.html +++ b/dev/types/WatchImmediateCallback.html @@ -1,3 +1,3 @@ WatchImmediateCallback | @conterra/reactivity-core - v0.4.3

    Type Alias WatchImmediateCallback<T>

    WatchImmediateCallback<T>: ((value: T, oldValue: T | undefined) => void | CleanupFunc)

    Like WatchCallback, but the oldValue parameter may be undefined for the first invocation. This is the case when immediate: true has been passed to the watch function, in which case there cannot be a previous value.

    -

    Type Parameters

    • T
    +

    Type Parameters