[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { FileOperator, Rule, Source } from '../engine/interface';
|
---|
| 9 | import { FilePredicate, MergeStrategy, Tree } from '../tree/interface';
|
---|
| 10 | /**
|
---|
| 11 | * A Source that returns an tree as its single value.
|
---|
| 12 | */
|
---|
| 13 | export declare function source(tree: Tree): Source;
|
---|
| 14 | /**
|
---|
| 15 | * A source that returns an empty tree.
|
---|
| 16 | */
|
---|
| 17 | export declare function empty(): Source;
|
---|
| 18 | /**
|
---|
| 19 | * Chain multiple rules into a single rule.
|
---|
| 20 | */
|
---|
| 21 | export declare function chain(rules: Rule[]): Rule;
|
---|
| 22 | /**
|
---|
| 23 | * Apply multiple rules to a source, and returns the source transformed.
|
---|
| 24 | */
|
---|
| 25 | export declare function apply(source: Source, rules: Rule[]): Source;
|
---|
| 26 | /**
|
---|
| 27 | * Merge an input tree with the source passed in.
|
---|
| 28 | */
|
---|
| 29 | export declare function mergeWith(source: Source, strategy?: MergeStrategy): Rule;
|
---|
| 30 | export declare function noop(): Rule;
|
---|
| 31 | export declare function filter(predicate: FilePredicate<boolean>): Rule;
|
---|
| 32 | export declare function asSource(rule: Rule): Source;
|
---|
| 33 | export declare function branchAndMerge(rule: Rule, strategy?: MergeStrategy): Rule;
|
---|
| 34 | export declare function when(predicate: FilePredicate<boolean>, operator: FileOperator): FileOperator;
|
---|
| 35 | export declare function partitionApplyMerge(predicate: FilePredicate<boolean>, ruleYes: Rule, ruleNo?: Rule): Rule;
|
---|
| 36 | export declare function forEach(operator: FileOperator): Rule;
|
---|
| 37 | export declare function composeFileOperators(operators: FileOperator[]): FileOperator;
|
---|
| 38 | export declare function applyToSubtree(path: string, rules: Rule[]): Rule;
|
---|