@@ -77,7 +77,7 @@ const { create: actualCreate, createStore: actualCreateStore } =
77
77
// a variable to hold reset functions for all stores declared in the app
78
78
export const storeResetFns = new Set <() => void >()
79
79
80
- const createInternalFn = <T >(stateCreator : zustand .StateCreator <T >) => {
80
+ const createUncurried = <T >(stateCreator : zustand .StateCreator <T >) => {
81
81
const store = actualCreate (stateCreator )
82
82
const initialState = store .getState ()
83
83
storeResetFns .add (() => {
@@ -92,11 +92,11 @@ export const create = (<T>() => {
92
92
93
93
// to support curried version of create
94
94
return typeof stateCreator === " function"
95
- ? createInternalFn (stateCreator )
96
- : createInternalFn
95
+ ? createUncurried (stateCreator )
96
+ : createUncurried
97
97
}) as typeof zustand .create
98
98
99
- const createStoreInternalFn = <T >(stateCreator : zustand .StateCreator <T >) => {
99
+ const createStoreUncurried = <T >(stateCreator : zustand .StateCreator <T >) => {
100
100
const store = actualCreateStore (stateCreator )
101
101
const initialState = store .getState ()
102
102
storeResetFns .add (() => {
@@ -111,8 +111,8 @@ export const createStore = (<T>(stateCreator: zustand.StateCreator<T>) => {
111
111
112
112
// to support curried version of createStore
113
113
return typeof stateCreator === " function"
114
- ? createStoreInternalFn (stateCreator )
115
- : createStoreInternalFn
114
+ ? createStoreUncurried (stateCreator )
115
+ : createStoreUncurried
116
116
}) as typeof zustand .createStore
117
117
118
118
// reset all stores after each test run
@@ -166,7 +166,7 @@ const { create: actualCreate, createStore: actualCreateStore } =
166
166
// a variable to hold reset functions for all stores declared in the app
167
167
export const storeResetFns = new Set <() => void >()
168
168
169
- const createInternalFn = <T >(stateCreator : zustand .StateCreator <T >) => {
169
+ const createUncurried = <T >(stateCreator : zustand .StateCreator <T >) => {
170
170
const store = actualCreate (stateCreator )
171
171
const initialState = store .getState ()
172
172
storeResetFns .add (() => {
@@ -181,11 +181,11 @@ export const create = (<T>() => {
181
181
182
182
// to support curried version of create
183
183
return typeof stateCreator === " function"
184
- ? createInternalFn (stateCreator )
185
- : createInternalFn
184
+ ? createUncurried (stateCreator )
185
+ : createUncurried
186
186
}) as typeof zustand .create
187
187
188
- const createStoreInternalFn = <T >(stateCreator : zustand .StateCreator <T >) => {
188
+ const createStoreUncurried = <T >(stateCreator : zustand .StateCreator <T >) => {
189
189
const store = actualCreateStore (stateCreator )
190
190
const initialState = store .getState ()
191
191
storeResetFns .add (() => {
@@ -200,8 +200,8 @@ export const createStore = (<T>(stateCreator: zustand.StateCreator<T>) => {
200
200
201
201
// to support curried version of createStore
202
202
return typeof stateCreator === " function"
203
- ? createStoreInternalFn (stateCreator )
204
- : createStoreInternalFn
203
+ ? createStoreUncurried (stateCreator )
204
+ : createStoreUncurried
205
205
}) as typeof zustand .createStore
206
206
207
207
// reset all stores after each test run
0 commit comments