@@ -69,11 +69,11 @@ const storeWithPreloadedState: Store<State> = createStore(reducer, {
69
69
b : { c : 'c' , d : 'd' } ,
70
70
e : brandedString
71
71
} )
72
- // @ts -expect-error
73
- const storeWithBadPreloadedState : Store < State > = createStore ( reducer , {
74
- b : { c : 'c' } ,
75
- e : brandedString
76
- } )
72
+
73
+ const storeWithBadPreloadedState : Store < State > =
74
+ // @ts -expect-error
75
+ // prettier-ignore
76
+ createStore ( reducer , { b : { c : 'c' } , e : brandedString } )
77
77
78
78
const reducerA : Reducer < string > = ( state = 'a' ) => state
79
79
const reducerB : Reducer < { c : string ; d : string } > = (
@@ -91,14 +91,11 @@ const storeWithCombineReducer = createStore(combinedReducer, {
91
91
b : { c : 'c' , d : 'd' } ,
92
92
e : brandedString
93
93
} )
94
- // @ts -expect-error
95
- const storeWithCombineReducerAndBadPreloadedState = createStore (
96
- combinedReducer ,
97
- {
98
- b : { c : 'c' } ,
99
- e : brandedString
100
- }
101
- )
94
+
95
+ const storeWithCombineReducerAndBadPreloadedState =
96
+ // @ts -expect-error
97
+ // prettier-ignore
98
+ createStore ( combinedReducer , { b : { c : 'c' } , e : brandedString } )
102
99
103
100
const nestedCombinedReducer = combineReducers ( {
104
101
a : ( state : string = 'a' ) => state ,
@@ -120,10 +117,10 @@ const simpleCombinedReducer = combineReducers({
120
117
d : ( state : string = 'd' ) => state
121
118
} )
122
119
123
- // @ts -expect-error
124
- const storeWithSimpleCombinedReducer = createStore ( simpleCombinedReducer , {
125
- c : 5
126
- } )
120
+ const storeWithSimpleCombinedReducer =
121
+ // @ts -expect-error
122
+ // prettier-ignore
123
+ createStore ( simpleCombinedReducer , { c : 5 } )
127
124
128
125
// Note: It's not necessary that the errors occur on the lines specified, just as long as something errors somewhere
129
126
// since the preloaded state doesn't match the reducer type.
@@ -133,11 +130,10 @@ const simpleCombinedReducerWithImplicitState = combineReducers({
133
130
d : ( state = 'd' ) => state
134
131
} )
135
132
136
- // @ts -expect-error
137
- const storeWithSimpleCombinedReducerWithImplicitState = createStore (
138
- simpleCombinedReducerWithImplicitState ,
139
- { c : 5 }
140
- )
133
+ const storeWithSimpleCombinedReducerWithImplicitState =
134
+ // @ts -expect-error
135
+ // prettier-ignore
136
+ createStore ( simpleCombinedReducerWithImplicitState , { c : 5 } )
141
137
142
138
const storeWithActionReducer = createStore ( reducerWithAction )
143
139
const storeWithActionReducerAndPreloadedState = createStore ( reducerWithAction , {
@@ -148,14 +144,10 @@ const storeWithActionReducerAndPreloadedState = createStore(reducerWithAction, {
148
144
funcWithStore ( storeWithActionReducer )
149
145
funcWithStore ( storeWithActionReducerAndPreloadedState )
150
146
151
- // @ts -expect-error
152
- const storeWithActionReducerAndBadPreloadedState = createStore (
153
- reducerWithAction ,
154
- {
155
- b : { c : 'c' } ,
156
- e : brandedString
157
- }
158
- )
147
+ const storeWithActionReducerAndBadPreloadedState =
148
+ // @ts -expect-error
149
+ // prettier-ignore
150
+ createStore ( reducerWithAction , { b : { c : 'c' } , e : brandedString } )
159
151
160
152
const enhancer : StoreEnhancer = next => next
161
153
0 commit comments