kibana/x-pack/plugins/infra/types/redux_observable.d.ts
Kerry Gallagher 0a6c748cc8
[Logs / Metrics] New Platform migration (full cutover) (#54583)
* Fully migrates metrics and logs to the NP

Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2020-02-18 19:22:27 +00:00

86 lines
2 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { Action, MiddlewareAPI } from 'redux';
import { ActionsObservable, Epic } from 'redux-observable';
import { Observable } from 'rxjs';
declare module 'redux-observable' {
function combineEpics<
T1 extends Action,
T2 extends Action,
O1 extends T1,
O2 extends T2,
S,
D1,
D2
>(epic1: Epic<T1, O1, S, D1>, epic2: Epic<T2, O2, S, D2>): Epic<T1 | T2, O1 | O2, S, D1 & D2>;
function combineEpics<
T1 extends Action,
T2 extends Action,
T3 extends Action,
O1 extends T1,
O2 extends T2,
O3 extends T3,
S,
D1,
D2,
D3
>(
epic1: Epic<T1, O1, S, D1>,
epic2: Epic<T2, O2, S, D2>,
epic3: Epic<T3, O3, S, D3>
): Epic<T1 | T2 | T3, O1 | O2 | O3, S, D1 & D2 & D3>;
function combineEpics<
T1 extends Action,
T2 extends Action,
T3 extends Action,
T4 extends Action,
O1 extends T1,
O2 extends T2,
O3 extends T3,
O4 extends T4,
S,
D1,
D2,
D3,
D4
>(
epic1: Epic<T1, O1, S, D1>,
epic2: Epic<T2, O2, S, D2>,
epic3: Epic<T3, O3, S, D3>,
epic4: Epic<T4, O4, S, D4>
): Epic<T1 | T2 | T3 | T4, O1 | O2 | O3 | O4, S, D1 & D2 & D3 & D4>;
function combineEpics<
T1 extends Action,
T2 extends Action,
T3 extends Action,
T4 extends Action,
T5 extends Action,
O1 extends T1,
O2 extends T2,
O3 extends T3,
O4 extends T4,
O5 extends T5,
S,
D1,
D2,
D3,
D4,
D5
>(
epic1: Epic<T1, O1, S, D1>,
epic2: Epic<T2, O2, S, D2>,
epic3: Epic<T3, O3, S, D3>,
epic4: Epic<T4, O4, S, D4>,
epic5: Epic<T5, O5, S, D5>
): Epic<T1 | T2 | T3 | T4 | T5, O1 | O2 | O3 | O4 | O5, S, D1 & D2 & D3 & D4 & D5>;
type EpicWithState<E, S> = E extends Epic<infer In, infer Out, null, infer Deps>
? Epic<In, Out, S, Deps>
: E;
}