@slimlib/store 2.0.2 → 2.0.3

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/src/symbols.ts DELETED
@@ -1,9 +0,0 @@
1
- // Symbols for objects that ARE exposed to users
2
- // These must remain symbols to avoid leaking internal implementation details
3
- export const [
4
- unwrap,
5
- propertyDepsSymbol,
6
- trackSymbol,
7
- childrenSymbol,
8
- // biome-ignore lint/suspicious/noSparseArray: fine
9
- ] = Array.from([, , , ,], Symbol) as [symbol, symbol, symbol, symbol];
package/src/types.ts DELETED
@@ -1,47 +0,0 @@
1
- /**
2
- * Public types for the reactive store
3
- */
4
-
5
- /**
6
- * Cleanup function returned by effect callback
7
- */
8
- export type EffectCleanup = () => void;
9
-
10
- /**
11
- * Callback function for onDispose registration
12
- */
13
- export type OnDisposeCallback = (cleanup: () => void) => void;
14
-
15
- /**
16
- * Callback function passed to scope
17
- */
18
- export type ScopeCallback = (onDispose: OnDisposeCallback) => void;
19
-
20
- /**
21
- * Function type for creating or disposing a scope
22
- * When called with a callback, extends the scope; when called without arguments, disposes the scope
23
- */
24
- export type ScopeFunction = ((callback: ScopeCallback) => Scope) & (() => void);
25
-
26
- /**
27
- * A reactive scope for managing effect lifecycles
28
- * Scopes can be nested and automatically clean up their tracked effects when disposed
29
- */
30
- export type Scope = ScopeFunction & { [key: symbol]: unknown };
31
-
32
- /**
33
- * Signal type - a callable that returns the current value with a set method
34
- */
35
- export type Signal<T> = (() => T) & { set: (value: T) => void };
36
-
37
- /**
38
- * A computed value that automatically tracks dependencies and caches results
39
- * Calling the function returns the current computed value
40
- */
41
- export type Computed<T> = () => T;
42
-
43
- /**
44
- * An effect is represented by its dispose function
45
- * Calling this function will stop the effect and run any cleanup
46
- */
47
- export type Effect = () => void;