@cascateer/core 2.4.5 → 2.4.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/index.ts +1 -1
- package/src/slice.ts +26 -13
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ApiProvider, type ApiEffect } from "./api";
|
|
2
2
|
export { App } from "./app";
|
|
3
|
-
export {
|
|
3
|
+
export { createComponent } from "./component";
|
|
4
4
|
export { defineCustomProperties } from "./dom";
|
|
5
5
|
export { createElement, createFragment } from "./jsx-runtime";
|
|
6
6
|
export { Serializable, type BrandedSerializer } from "./serializable";
|
package/src/slice.ts
CHANGED
|
@@ -77,17 +77,31 @@ interface SliceConfig<
|
|
|
77
77
|
>;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export const createSlice =
|
|
81
|
-
Data
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
export const createSlice =
|
|
81
|
+
<Data>(data: Data) =>
|
|
82
|
+
<
|
|
83
|
+
StoreSignals extends Dictionary<ComputedSignal<any>>,
|
|
84
|
+
StoreActions extends Dictionary<Action<any, any>>,
|
|
85
|
+
ApiEffects extends Dictionary<ApiEffect<any, any>>,
|
|
86
|
+
ApiActions extends Dictionary<Action<any, any>>,
|
|
87
|
+
TerminalEffects extends Dictionary<TerminalEffect<any, any>>,
|
|
88
|
+
TerminalActions extends Dictionary<Action<any, any>>,
|
|
89
|
+
Components extends Dictionary<ComponentConstructor<any>>,
|
|
90
|
+
>(
|
|
91
|
+
config: Omit<
|
|
92
|
+
SliceConfig<
|
|
93
|
+
Data,
|
|
94
|
+
StoreSignals,
|
|
95
|
+
StoreActions,
|
|
96
|
+
ApiEffects,
|
|
97
|
+
ApiActions,
|
|
98
|
+
TerminalEffects,
|
|
99
|
+
TerminalActions,
|
|
100
|
+
Components
|
|
101
|
+
>,
|
|
102
|
+
"data"
|
|
103
|
+
>,
|
|
104
|
+
): SliceConfig<
|
|
91
105
|
Data,
|
|
92
106
|
StoreSignals,
|
|
93
107
|
StoreActions,
|
|
@@ -96,8 +110,7 @@ export const createSlice = <
|
|
|
96
110
|
TerminalEffects,
|
|
97
111
|
TerminalActions,
|
|
98
112
|
Components
|
|
99
|
-
|
|
100
|
-
) => config;
|
|
113
|
+
> => ({ data, ...config });
|
|
101
114
|
|
|
102
115
|
export class Slice<
|
|
103
116
|
Data,
|