import { Action, ActionCreator, Creator } from '@ngrx/store'; import { Observable, OperatorFunction, Operator } from 'rxjs'; export declare class Actions extends Observable { constructor(source?: Observable); lift(operator: Operator): Observable; } declare type ActionExtractor, E> = T extends string ? E : ReturnType>; /** * 'ofType' filters an Observable of Actions into an observable of the actions * whose type strings are passed to it. * * For example, if `actions` has type `Actions`, and * the type of the `Addition` action is `add`, then * `actions.pipe(ofType('add'))` returns an `Observable`. * * Properly typing this function is hard and requires some advanced TS tricks * below. * * Type narrowing automatically works, as long as your `actions` object * starts with a `Actions` instead of generic `Actions`. * * For backwards compatibility, when one passes a single type argument * `ofType('something')` the result is an `Observable`. Note, that `T` * completely overrides any possible inference from 'something'. * * Unfortunately, for unknown 'actions: Actions' these types will produce * 'Observable'. In such cases one has to manually set the generic type * like `actions.ofType('add')`. */ export declare function ofType[], U extends Action = Action, V = ReturnType>(...allowedTypes: AC): OperatorFunction; export declare function ofType, AC extends ActionCreator, T1 extends string | AC, U extends Action = Action, V = T1 extends string ? E : ReturnType>>(t1: T1): OperatorFunction; export declare function ofType, AC extends ActionCreator, T1 extends string | AC, T2 extends string | AC, U extends Action = Action, V = ActionExtractor>(t1: T1, t2: T2): OperatorFunction; export declare function ofType, AC extends ActionCreator, T1 extends string | AC, T2 extends string | AC, T3 extends string | AC, U extends Action = Action, V = ActionExtractor>(t1: T1, t2: T2, t3: T3): OperatorFunction; export declare function ofType, AC extends ActionCreator, T1 extends string | AC, T2 extends string | AC, T3 extends string | AC, T4 extends string | AC, U extends Action = Action, V = ActionExtractor>(t1: T1, t2: T2, t3: T3, t4: T4): OperatorFunction; export declare function ofType, AC extends ActionCreator, T1 extends string | AC, T2 extends string | AC, T3 extends string | AC, T4 extends string | AC, T5 extends string | AC, U extends Action = Action, V = ActionExtractor>(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): OperatorFunction; /** * Fallback for more than 5 arguments. * There is no inference, so the return type is the same as the input - * Observable. * * We provide a type parameter, even though TS will not infer it from the * arguments, to preserve backwards compatibility with old versions of ngrx. */ export declare function ofType(...allowedTypes: Array>): OperatorFunction; export {};