UNPKG

957 BTypeScriptView Raw
1import { MonoTypeOperatorFunction, Observable } from 'rxjs';
2import { BuildGraph } from './build-graph';
3/**
4 * A transformation applied over the build graph.
5 *
6 * By design, a pipeable operator over `BuildGraph`.
7 * - A transformation takes a `BuildGraph` as input (from previous transformations).
8 * - A transformation performs some operations based on the graph's data, potentially modifying nodes in the graph.
9 * - It returns a `BuildGraph` that will be passed to subsequent transformations.
10 *
11 * @link https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md#pipeable-operators
12 */
13export interface Transform extends MonoTypeOperatorFunction<BuildGraph> {
14 (source$: Observable<BuildGraph>): Observable<BuildGraph>;
15}
16export interface PromiseBasedTransform {
17 (graph: BuildGraph): Promise<BuildGraph | void> | BuildGraph | void;
18}
19export declare const transformFromPromise: (transformFn: PromiseBasedTransform) => Transform;