solid-ctrl-flow 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +8 -4
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -7,7 +7,11 @@ import { Setter } from 'solid-js';
7
7
  import { Signal } from 'solid-js';
8
8
 
9
9
  /**
10
- * Creates a one-way binding between two {@link Signal}s
10
+ * Creates a one-way binding between two {@link Signal}s.
11
+ * The function uses {@link createRenderEffect}, which means that:
12
+ * - As soon as the function is done executing the two {@link Signal}s will have the same value
13
+ * - If {@link source} changes, {@link dest} wont be instantly updated
14
+ * - If the current owner gets disposed before {@link dest} is updated, it never will
11
15
  * @param source The source of the binding
12
16
  * @param dest The destination of the binding
13
17
  * @param to Conversion function from {@link S} to {@link D}
@@ -18,7 +22,7 @@ export declare function bind<S>(source: Signal<S>, dest: Signal<S>): () => void;
18
22
  export declare function bind<S, D>(source: Signal<S>, dest: Signal<D>, to: Convert<S, D>): () => void;
19
23
 
20
24
  /**
21
- * Creates a two-way binding between two {@link Signal}s
25
+ * Creates a two-way binding between two {@link Signal}s calling {@link bind} two times
22
26
  * @param source The source of the binding
23
27
  * @param dest The destination of the binding
24
28
  * @param to Conversion function from {@link S} to {@link D}
@@ -68,7 +72,7 @@ export declare function Case(props: {
68
72
  * Returns a {@link Signal} that applies the `??=` operator to the input one.
69
73
  * If the getter of {@link param0} is like "x", then the result one is like "(x ??= {@link f}())"
70
74
  * @param param0 The {@link Signal} to which to coalesce the getter
71
- * @param f A function that creates a new {@link T}
75
+ * @param f An {@link Accessor} to the value to use when there's a nullish value
72
76
  */
73
77
  export declare function coalesceSignal<T>([get, set]: Signal<T | undefined>, f: Accessor<T>): Signal<T>;
74
78
 
@@ -205,7 +209,7 @@ export declare function toSignal<T, K extends keyof T>(obj: Accessor<T>, k: Acce
205
209
  * @param args Arguments for calling {@link f}
206
210
  * @returns The same thing {@link f} returned
207
211
  */
208
- export declare function untrackCall<F extends (...args: any[]) => any>(this: ThisParameterType<F>, f: F, ...args: Parameters<F>): any;
212
+ export declare function untrackCall<F extends (...args: any[]) => any>(this: ThisParameterType<F>, f: F, ...args: Parameters<F>): ReturnType<F>;
209
213
 
210
214
  /**
211
215
  * Calls {@link f} maintaining its reactivity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",