solid-ctrl-flow 1.0.23 → 1.0.24

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.
package/dist/index.d.ts CHANGED
@@ -184,10 +184,10 @@ export declare function toSetter<T>(get: Accessor<T>, set: (x: T) => void): Sett
184
184
 
185
185
  /**
186
186
  * Creates a {@link Signal} from a property access
187
- * @param obj The object from which to get the property
188
- * @param k The key of the property
187
+ * @param obj The {@link Accessor} to the object from which to get the property
188
+ * @param k The {@link Accessor} to the key of the property
189
189
  */
190
- export declare function toSignal<T, K extends keyof T>(obj: T, k: K): Signal<T[K]>;
190
+ export declare function toSignal<T, K extends keyof T>(obj: Accessor<T>, k: Accessor<K>): Signal<T[K]>;
191
191
 
192
192
  /**
193
193
  * Executes {@link f} untracking it.
package/dist/index.mjs CHANGED
@@ -75,8 +75,8 @@ function toSetter(get, set) {
75
75
  };
76
76
  }
77
77
  function toSignal(obj, k) {
78
- const get = () => obj[k];
79
- return [get, toSetter(get, (v) => obj[k] = v)];
78
+ const get = () => obj()[k()];
79
+ return [get, toSetter(get, (v) => obj()[k()] = v)];
80
80
  }
81
81
  function unwrapSignal(f) {
82
82
  return [() => f()[0](), (x) => f()[1](x)];
package/dist/index.umd.js CHANGED
@@ -77,8 +77,8 @@
77
77
  };
78
78
  }
79
79
  function toSignal(obj, k) {
80
- const get = () => obj[k];
81
- return [get, toSetter(get, (v) => obj[k] = v)];
80
+ const get = () => obj()[k()];
81
+ return [get, toSetter(get, (v) => obj()[k()] = v)];
82
82
  }
83
83
  function unwrapSignal(f) {
84
84
  return [() => f()[0](), (x) => f()[1](x)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",