@signaltree/core 6.0.6 → 6.0.7
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 +1 -1
- package/src/lib/signal-tree.d.ts +2 -2
- package/src/lib/types.d.ts +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signaltree/core",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.7",
|
|
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,
|
package/src/lib/signal-tree.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TreeConfig, NodeAccessor,
|
|
1
|
+
import type { TreeConfig, NodeAccessor, SignalTree } from './types';
|
|
2
2
|
export declare function isNodeAccessor(value: unknown): value is NodeAccessor<unknown>;
|
|
3
|
-
export declare function signalTree<T extends object>(initialState: T, config?: TreeConfig):
|
|
3
|
+
export declare function signalTree<T extends object>(initialState: T, config?: TreeConfig): SignalTree<T>;
|
package/src/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Signal, WritableSignal } from '@angular/core';
|
|
2
|
+
|
|
2
3
|
import { SecurityValidatorConfig } from './security/security-validator';
|
|
4
|
+
|
|
3
5
|
export interface TimeTravelConfig {
|
|
4
6
|
enabled?: boolean;
|
|
5
7
|
maxHistorySize?: number;
|
|
@@ -37,7 +39,7 @@ export type TreeNode<T> = {
|
|
|
37
39
|
export interface ISignalTree<T> extends NodeAccessor<T> {
|
|
38
40
|
readonly state: TreeNode<T>;
|
|
39
41
|
readonly $: TreeNode<T>;
|
|
40
|
-
with<
|
|
42
|
+
with<TAdded>(enhancer: (tree: this) => this & TAdded): this & TAdded;
|
|
41
43
|
bind(thisArg?: unknown): NodeAccessor<T>;
|
|
42
44
|
destroy(): void;
|
|
43
45
|
}
|
|
@@ -282,7 +284,7 @@ export type CallableWritableSignal<T> = WritableSignal<T> & {
|
|
|
282
284
|
};
|
|
283
285
|
export type AccessibleNode<T> = NodeAccessor<T> & TreeNode<T>;
|
|
284
286
|
export declare const ENHANCER_META: unique symbol;
|
|
285
|
-
export type Enhancer<TAdded> =
|
|
287
|
+
export type Enhancer<TAdded> = (tree: ISignalTree<any>) => ISignalTree<any> & TAdded;
|
|
286
288
|
export type EnhancerWithMeta<TAdded> = Enhancer<TAdded> & {
|
|
287
289
|
metadata?: EnhancerMeta;
|
|
288
290
|
};
|
|
@@ -295,7 +297,7 @@ export interface EnhancerMeta {
|
|
|
295
297
|
export type FullSignalTree<T> = ISignalTree<T> & EffectsMethods<T> & BatchingMethods<T> & MemoizationMethods<T> & TimeTravelMethods<T> & DevToolsMethods & EntitiesEnabled & OptimizedUpdateMethods<T>;
|
|
296
298
|
export type ProdSignalTree<T> = ISignalTree<T> & EffectsMethods<T> & BatchingMethods<T> & MemoizationMethods<T> & EntitiesEnabled & OptimizedUpdateMethods<T>;
|
|
297
299
|
export type MinimalSignalTree<T> = ISignalTree<T> & EffectsMethods<T>;
|
|
298
|
-
export type SignalTree<T> = ISignalTree<T>;
|
|
299
|
-
export type SignalTreeBase<T> = ISignalTree<T>;
|
|
300
|
+
export type SignalTree<T> = ISignalTree<T> & TreeNode<T>;
|
|
301
|
+
export type SignalTreeBase<T> = ISignalTree<T> & TreeNode<T>;
|
|
300
302
|
export declare function isSignalTree<T>(value: unknown): value is ISignalTree<T>;
|
|
301
303
|
export {};
|