Skip to content

Commit

Permalink
feat(typings): Output actions should extend input actions.
Browse files Browse the repository at this point in the history
After some discussion, it was agreed that essentially all actions flow through input actions including output actions. This means that output actions should indeed extend from input actions.
  • Loading branch information
ajcrites committed Apr 13, 2018
1 parent 0b0efc0 commit d109077
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export declare class StateObservable<S> extends Observable<S> {
}


export declare interface Epic<T extends Action, O extends Action = T, S = void, D = any> {
export declare interface Epic<T extends Action, O extends T, S = void, D = any> {
(action$: ActionsObservable<T>, state$: StateObservable<S>, dependencies: D): Observable<O>;
}

export interface EpicMiddleware<T extends Action, O extends Action = T, S = void, D = any> extends Middleware {
export interface EpicMiddleware<T extends Action, O extends T, S = void, D = any> extends Middleware {
replaceEpic(nextEpic: Epic<T, O, S, D>): void;
}

Expand All @@ -56,9 +56,9 @@ interface Options<D = any> {
dependencies?: D;
}

export declare function createEpicMiddleware<T extends Action, O extends Action = T, S = void, D = any>(rootEpic: Epic<T, O, S, D>, options?: Options<D>): EpicMiddleware<T, O, S, D>;
export declare function createEpicMiddleware<T extends Action, O extends T, S = void, D = any>(rootEpic: Epic<T, O, S, D>, options?: Options<D>): EpicMiddleware<T, O, S, D>;

export declare function combineEpics<T extends Action, O extends Action = T, S = void, D = any>(...epics: Epic<T, O, S, D>[]): Epic<T, O, S, D>;
export declare function combineEpics<T extends Action, O extends T, S = void, D = any>(...epics: Epic<T, O, S, D>[]): Epic<T, O, S, D>;
export declare function combineEpics<E>(...epics: E[]): E;
export declare function combineEpics(...epics: any[]): any;

Expand Down

0 comments on commit d109077

Please sign in to comment.