@xaendar/signals 0.3.35 → 0.3.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaendar/signals",
3
- "version": "0.3.35",
3
+ "version": "0.3.38",
4
4
  "description": "A library for managing signals in web applications",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@xaendar/common": "0.3.35",
20
- "@xaendar/types": "0.3.35"
19
+ "@xaendar/common": "0.3.38",
20
+ "@xaendar/types": "0.3.38"
21
21
  }
22
22
  }
@@ -299,6 +299,14 @@ declare type ComputedState = 'dirty' | 'checked' | 'computing' | 'clean';
299
299
  */
300
300
  export declare function effect(fn: NoArgsVoidFunction): NoArgsVoidFunction;
301
301
 
302
+ /**
303
+ * Utility type to extract the inner type of a Signal.State.
304
+ * @example
305
+ * type MySignal = Signal.State<number>;
306
+ * type ExtractedType = ExtractSignalType<MySignal>; // ExtractedType is number
307
+ */
308
+ export declare type ExtractSignalType<T> = T extends Signal.State<infer U> ? U : never;
309
+
302
310
  /**
303
311
  * Loads the Signals library by defining the `Signal` global object with the following properties:
304
312
  * - `State`: The `State` class for creating reactive state variables.