This commit is contained in:
Nathan Bierema 2024-08-04 20:17:12 -04:00
parent 4e7cb943e9
commit 2054a4aeec
2 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@ export default function configureStore<
MonitorState, MonitorState,
MonitorAction extends Action<string>, MonitorAction extends Action<string>,
>( >(
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-empty-object-type
next: StoreEnhancerStoreCreator<{}, unknown>, next: StoreEnhancerStoreCreator<{}, unknown>,
subscriber: Reducer<MonitorState, MonitorAction>, subscriber: Reducer<MonitorState, MonitorAction>,
options: Options<S, A, MonitorState, MonitorAction>, options: Options<S, A, MonitorState, MonitorAction>,

View File

@ -160,7 +160,7 @@ interface ActionMessage {
interface DispatchMessage<S, A extends Action<string>> { interface DispatchMessage<S, A extends Action<string>> {
readonly type: 'DISPATCH'; readonly type: 'DISPATCH';
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-empty-object-type
readonly action: LiftedAction<S, A, {}>; readonly action: LiftedAction<S, A, {}>;
} }
@ -175,7 +175,7 @@ type Message<S, A extends Action<string>> =
| DispatchMessage<S, A>; | DispatchMessage<S, A>;
class DevToolsEnhancer<S, A extends Action<string>> { class DevToolsEnhancer<S, A extends Action<string>> {
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-empty-object-type
store!: EnhancedStore<S, A, {}>; store!: EnhancedStore<S, A, {}>;
filters: LocalFilter | undefined; filters: LocalFilter | undefined;
instanceId?: string; instanceId?: string;
@ -309,7 +309,7 @@ class DevToolsEnhancer<S, A extends Action<string>> {
) { ) {
this.store.liftedStore.dispatch({ this.store.liftedStore.dispatch({
type: 'IMPORT_STATE', type: 'IMPORT_STATE',
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-empty-object-type
nextLiftedState: parse(message.state) as LiftedState<S, A, {}>, nextLiftedState: parse(message.state) as LiftedState<S, A, {}>,
}); });
} else if (message.type === 'UPDATE') { } else if (message.type === 'UPDATE') {
@ -483,7 +483,7 @@ class DevToolsEnhancer<S, A extends Action<string>> {
return false; return false;
}; };
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-empty-object-type
monitorReducer = (state = {}, action: LiftedAction<S, A, {}>) => { monitorReducer = (state = {}, action: LiftedAction<S, A, {}>) => {
this.lastAction = action.type; this.lastAction = action.type;
if (!this.started && this.sendOnError === 2 && this.store.liftedStore) if (!this.started && this.sendOnError === 2 && this.store.liftedStore)
@ -492,26 +492,26 @@ class DevToolsEnhancer<S, A extends Action<string>> {
if ( if (
this.startOn && this.startOn &&
!this.started && !this.started &&
this.startOn.indexOf((action as PerformAction<A>).action.type) !== -1 this.startOn.includes((action as PerformAction<A>).action.type)
) )
async(this.start); async(this.start);
else if ( else if (
this.stopOn && this.stopOn &&
this.started && this.started &&
this.stopOn.indexOf((action as PerformAction<A>).action.type) !== -1 this.stopOn.includes((action as PerformAction<A>).action.type)
) )
async(this.stop); async(this.stop);
else if ( else if (
this.sendOn && this.sendOn &&
!this.started && !this.started &&
this.sendOn.indexOf((action as PerformAction<A>).action.type) !== -1 this.sendOn.includes((action as PerformAction<A>).action.type)
) )
async(this.send); async(this.send);
} }
return state; return state;
}; };
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-empty-object-type
handleChange(state: S, liftedState: LiftedState<S, A, {}>, maxAge: number) { handleChange(state: S, liftedState: LiftedState<S, A, {}>, maxAge: number) {
if (this.checkForReducerErrors(liftedState)) return; if (this.checkForReducerErrors(liftedState)) return;