@xaendar/signals 0.6.13 → 0.6.15
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.
|
@@ -254,7 +254,7 @@ declare class Computed<T = any> {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
257
|
+
* Represents the state of a computed signal.
|
|
258
258
|
* The state can be one of the following:
|
|
259
259
|
* - `dirty`: the computed signal is dirty and needs to be recomputed.
|
|
260
260
|
* - `checked`: the computed signal is checked and needs to be recomputed.
|
|
@@ -305,6 +305,9 @@ export declare type ExtractSignalType<T> = T extends Signal.State<infer U> ? U :
|
|
|
305
305
|
* - `Watcher`: The `Watcher` class for observing changes in signals.
|
|
306
306
|
*
|
|
307
307
|
* This function should be called once to initialize the Signals library and make its API available globally.
|
|
308
|
+
*
|
|
309
|
+
* @param options - Optional configuration object.
|
|
310
|
+
* @param options.devMode - When `true`, enables development mode with extra runtime checks and logging.
|
|
308
311
|
*/
|
|
309
312
|
export declare function loadSignals(options?: {
|
|
310
313
|
devMode?: boolean;
|
|
@@ -316,6 +319,11 @@ export declare function loadSignals(options?: {
|
|
|
316
319
|
*/
|
|
317
320
|
export declare type SignalEqual<T> = (this: State<T> | Computed<T>, t: any, t2: any) => boolean;
|
|
318
321
|
|
|
322
|
+
/**
|
|
323
|
+
* Configuration options for creating a `State` or `Computed` signal.
|
|
324
|
+
*
|
|
325
|
+
* @template T - The value type held by the signal.
|
|
326
|
+
*/
|
|
319
327
|
export declare type SignalOptions<T> = {
|
|
320
328
|
/**
|
|
321
329
|
* Custom comparison function between old and new value. Default: Object.is.
|
|
@@ -926,6 +926,9 @@ function hasSources(signal) {
|
|
|
926
926
|
* - `Watcher`: The `Watcher` class for observing changes in signals.
|
|
927
927
|
*
|
|
928
928
|
* This function should be called once to initialize the Signals library and make its API available globally.
|
|
929
|
+
*
|
|
930
|
+
* @param options - Optional configuration object.
|
|
931
|
+
* @param options.devMode - When `true`, enables development mode with extra runtime checks and logging.
|
|
929
932
|
*/
|
|
930
933
|
function loadSignals(options) {
|
|
931
934
|
setDevMode(options?.devMode ?? false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xaendar/signals",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "A library implementing a reactive system for Xaendar framework. This signal implementation is based on the TC39 Stage1 proposal for reactive primitives.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@xaendar/common": "0.6.
|
|
20
|
-
"@xaendar/types": "0.6.
|
|
19
|
+
"@xaendar/common": "0.6.15",
|
|
20
|
+
"@xaendar/types": "0.6.15"
|
|
21
21
|
}
|
|
22
22
|
}
|