@@ -43,8 +43,8 @@ export abstract class EffectModule<S> {
43
43
private readonly actionStreams : any = { }
44
44
private readonly retryActionsCreator : any = { }
45
45
private readonly actionNames : string [ ] = [ ]
46
- private actionsToRetry : Set < string > = new Set ( )
47
- private actionsToSkip ! : string [ ]
46
+ private actionsToRetry ! : Set < string >
47
+ private actionsToSkip ! : Set < string >
48
48
private restoredFromSSR = false
49
49
50
50
get state$ ( ) {
@@ -119,10 +119,12 @@ export abstract class EffectModule<S> {
119
119
if ( ! context . store . ready ) {
120
120
context . store . setup ( context . getDefaultState ( ) )
121
121
context . actionsToRetry = new Set ( _globalThis [ RETRY_KEY_SYMBOL ] ?. [ this . moduleName ] || [ ] )
122
- context . actionsToSkip = context . restoredFromSSR
123
- ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
124
- getActionsToSkip ( context . constructor . prototype ) || [ ]
125
- : [ ]
122
+ context . actionsToSkip = new Set (
123
+ context . restoredFromSSR
124
+ ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
125
+ getActionsToSkip ( context . constructor . prototype ) || [ ]
126
+ : [ ] ,
127
+ )
126
128
}
127
129
return rawSetter . call ( this , value )
128
130
}
@@ -131,10 +133,12 @@ export abstract class EffectModule<S> {
131
133
if ( ! context . store . ready ) {
132
134
context . store . setup ( context . getDefaultState ( ) )
133
135
context . actionsToRetry = new Set ( _globalThis [ RETRY_KEY_SYMBOL ] ?. [ context . moduleName ] || [ ] )
134
- context . actionsToSkip = context . restoredFromSSR
135
- ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
136
- getActionsToSkip ( context . constructor . prototype ) || [ ]
137
- : [ ]
136
+ context . actionsToSkip = new Set (
137
+ context . restoredFromSSR
138
+ ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
139
+ getActionsToSkip ( context . constructor . prototype ) || [ ]
140
+ : [ ] ,
141
+ )
138
142
}
139
143
}
140
144
}
@@ -146,10 +150,12 @@ export abstract class EffectModule<S> {
146
150
if ( ! context . store . ready ) {
147
151
context . store . setup ( context . getDefaultState ( ) )
148
152
context . actionsToRetry = new Set ( _globalThis [ RETRY_KEY_SYMBOL ] ?. [ context . moduleName ] || [ ] )
149
- context . actionsToSkip = context . restoredFromSSR
150
- ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
151
- getActionsToSkip ( context . constructor . prototype ) || [ ]
152
- : [ ]
153
+ context . actionsToSkip = new Set (
154
+ context . restoredFromSSR
155
+ ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
156
+ getActionsToSkip ( context . constructor . prototype ) || [ ]
157
+ : [ ] ,
158
+ )
153
159
}
154
160
}
155
161
return Reflect . set ( target , p , value , receiver )
@@ -163,7 +169,7 @@ export abstract class EffectModule<S> {
163
169
this . store . setup ( this . getDefaultState ( ) )
164
170
this . actionsToRetry = new Set ( _globalThis [ RETRY_KEY_SYMBOL ] ?. [ this . moduleName ] || [ ] )
165
171
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
166
- this . actionsToSkip = this . restoredFromSSR ? getActionsToSkip ( this . constructor . prototype ) || [ ] : [ ]
172
+ this . actionsToSkip = new Set ( this . restoredFromSSR ? getActionsToSkip ( this . constructor . prototype ) || [ ] : [ ] )
167
173
}
168
174
} ,
169
175
get : ( ) => {
@@ -281,7 +287,7 @@ export abstract class EffectModule<S> {
281
287
const effect : Effect < unknown > = ( this as any ) [ name ]
282
288
const payload$ = action$ . pipe (
283
289
filter ( ( { type } , index ) => {
284
- const skipCount = ! this . actionsToRetry . has ( name ) && this . actionsToSkip ?. includes ( name ) ? 1 : 0
290
+ const skipCount = ! this . actionsToRetry . has ( name ) && this . actionsToSkip ?. has ( name ) ? 1 : 0
285
291
return type === name && skipCount <= index
286
292
} ) ,
287
293
map ( ( { payload } ) => payload ) ,
0 commit comments