@signaltree/core 5.0.0 → 5.0.2
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.
|
@@ -556,7 +556,6 @@ function withPersistence(config) {
|
|
|
556
556
|
});
|
|
557
557
|
}, debounceMs);
|
|
558
558
|
};
|
|
559
|
-
let usingReactiveSubscription = false;
|
|
560
559
|
try {
|
|
561
560
|
tree.subscribe(() => {
|
|
562
561
|
const currentState = JSON.stringify(tree());
|
|
@@ -565,7 +564,6 @@ function withPersistence(config) {
|
|
|
565
564
|
triggerAutoSave();
|
|
566
565
|
}
|
|
567
566
|
});
|
|
568
|
-
usingReactiveSubscription = true;
|
|
569
567
|
} catch {
|
|
570
568
|
const checkForChanges = () => {
|
|
571
569
|
if (!pollingActive) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signaltree/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Lightweight, type-safe signal-based state management for Angular. Core package providing hierarchical signal trees, basic entity management, and async actions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@angular/core": "^20.
|
|
68
|
+
"@angular/core": "^20.0.0",
|
|
69
69
|
"tslib": "^2.0.0"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
@@ -39,7 +39,7 @@ export interface CompositionLogger {
|
|
|
39
39
|
data: unknown;
|
|
40
40
|
}>;
|
|
41
41
|
}
|
|
42
|
-
export interface ModularDevToolsInterface<
|
|
42
|
+
export interface ModularDevToolsInterface<_T = unknown> {
|
|
43
43
|
activityTracker: ModuleActivityTracker;
|
|
44
44
|
logger: CompositionLogger;
|
|
45
45
|
metrics: Signal<ModularPerformanceMetrics>;
|
package/src/lib/types.d.ts
CHANGED
|
@@ -231,7 +231,7 @@ export interface LogEntry {
|
|
|
231
231
|
export interface ValidationConfig<T> {
|
|
232
232
|
validators: Array<{
|
|
233
233
|
match: (path: string) => boolean;
|
|
234
|
-
validate: (value:
|
|
234
|
+
validate: (value: T, path: string) => void | never;
|
|
235
235
|
}>;
|
|
236
236
|
onError?: (error: Error, path: string) => void;
|
|
237
237
|
}
|
|
@@ -252,9 +252,9 @@ export interface DevToolsConfig {
|
|
|
252
252
|
reorder?: boolean;
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
export type EntityType<T> = T extends EntitySignal<infer E,
|
|
256
|
-
export type EntityKeyType<T> = T extends EntitySignal<unknown, infer K> ? K : never;
|
|
257
|
-
export type IsEntityMap<T> = T extends EntityMapMarker<unknown,
|
|
255
|
+
export type EntityType<T> = T extends EntitySignal<infer E, infer K extends string | number> ? E : never;
|
|
256
|
+
export type EntityKeyType<T> = T extends EntitySignal<unknown, infer K extends string | number> ? K : never;
|
|
257
|
+
export type IsEntityMap<T> = T extends EntityMapMarker<unknown, infer K extends string | number> ? true : false;
|
|
258
258
|
export type EntityAwareTreeNode<T> = {
|
|
259
259
|
[K in keyof T]: T[K] extends EntityMapMarker<infer E, infer Key> ? EntitySignal<E, Key> : T[K] extends object ? EntityAwareTreeNode<T[K]> : CallableWritableSignal<T[K]>;
|
|
260
260
|
};
|