diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/lib/saga.ts b/x-pack/plugins/endpoint/public/applications/endpoint/lib/saga.ts index 030cf0a318262c..b93360ec6b5aa7 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/lib/saga.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/lib/saga.ts @@ -7,12 +7,7 @@ import { AnyAction, Dispatch, Middleware, MiddlewareAPI } from 'redux'; import { GlobalState } from '../store'; -interface StoreAction extends AnyAction { - payload: unknown[]; - type: string; -} - -interface QueuedAction { +interface QueuedAction { /** * The Redux action that was dispatched */ @@ -30,9 +25,9 @@ interface IteratorInstance { type Saga = (storeContext: SagaContext) => Promise; -type StoreActionsAndState = AsyncIterableIterator>; +type StoreActionsAndState = AsyncIterableIterator>; -export interface SagaContext { +export interface SagaContext { /** * A generator function that will `yield` `Promise`s that resolve with a `QueuedAction` */ @@ -116,7 +111,7 @@ export function createSagaMiddleware(saga: Saga): Middleware { }); runSaga(); } - return (next: Dispatch) => (action: StoreAction) => { + return (next: Dispatch) => (action: AnyAction) => { // Call the next dispatch method in the middleware chain. const returnValue = next(action);