Skip to content

Commit 30736f8

Browse files
committed
change function name
1 parent 0772db5 commit 30736f8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/guides/testing.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const { create: actualCreate, createStore: actualCreateStore } =
7777
// a variable to hold reset functions for all stores declared in the app
7878
export const storeResetFns = new Set<() => void>()
7979

80-
const createInternalFn = <T>(stateCreator: zustand.StateCreator<T>) => {
80+
const createUncurried = <T>(stateCreator: zustand.StateCreator<T>) => {
8181
const store = actualCreate(stateCreator)
8282
const initialState = store.getState()
8383
storeResetFns.add(() => {
@@ -92,11 +92,11 @@ export const create = (<T>() => {
9292

9393
// to support curried version of create
9494
return typeof stateCreator === "function"
95-
? createInternalFn(stateCreator)
96-
: createInternalFn
95+
? createUncurried(stateCreator)
96+
: createUncurried
9797
}) as typeof zustand.create
9898

99-
const createStoreInternalFn = <T>(stateCreator: zustand.StateCreator<T>) => {
99+
const createStoreUncurried = <T>(stateCreator: zustand.StateCreator<T>) => {
100100
const store = actualCreateStore(stateCreator)
101101
const initialState = store.getState()
102102
storeResetFns.add(() => {
@@ -111,8 +111,8 @@ export const createStore = (<T>(stateCreator: zustand.StateCreator<T>) => {
111111

112112
// to support curried version of createStore
113113
return typeof stateCreator === "function"
114-
? createStoreInternalFn(stateCreator)
115-
: createStoreInternalFn
114+
? createStoreUncurried(stateCreator)
115+
: createStoreUncurried
116116
}) as typeof zustand.createStore
117117

118118
// reset all stores after each test run
@@ -166,7 +166,7 @@ const { create: actualCreate, createStore: actualCreateStore } =
166166
// a variable to hold reset functions for all stores declared in the app
167167
export const storeResetFns = new Set<() => void>()
168168

169-
const createInternalFn = <T>(stateCreator: zustand.StateCreator<T>) => {
169+
const createUncurried = <T>(stateCreator: zustand.StateCreator<T>) => {
170170
const store = actualCreate(stateCreator)
171171
const initialState = store.getState()
172172
storeResetFns.add(() => {
@@ -181,11 +181,11 @@ export const create = (<T>() => {
181181

182182
// to support curried version of create
183183
return typeof stateCreator === "function"
184-
? createInternalFn(stateCreator)
185-
: createInternalFn
184+
? createUncurried(stateCreator)
185+
: createUncurried
186186
}) as typeof zustand.create
187187

188-
const createStoreInternalFn = <T>(stateCreator: zustand.StateCreator<T>) => {
188+
const createStoreUncurried = <T>(stateCreator: zustand.StateCreator<T>) => {
189189
const store = actualCreateStore(stateCreator)
190190
const initialState = store.getState()
191191
storeResetFns.add(() => {
@@ -200,8 +200,8 @@ export const createStore = (<T>(stateCreator: zustand.StateCreator<T>) => {
200200

201201
// to support curried version of createStore
202202
return typeof stateCreator === "function"
203-
? createStoreInternalFn(stateCreator)
204-
: createStoreInternalFn
203+
? createStoreUncurried(stateCreator)
204+
: createStoreUncurried
205205
}) as typeof zustand.createStore
206206

207207
// reset all stores after each test run

0 commit comments

Comments
 (0)