source: trip-planner-front/node_modules/@angular/cdk/schematics/update-tool/version-changes.d.ts@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
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 */
8import { TargetVersion } from './target-version';
9export declare type VersionChanges<T> = {
10 [target in TargetVersion]?: ReadableChange<T>[];
11};
12export declare type ReadableChange<T> = {
13 pr: string;
14 changes: T[];
15};
16/** Conditional type that unwraps the value of a version changes type. */
17export declare type ValueOfChanges<T> = T extends VersionChanges<infer X> ? X : null;
18/**
19 * Gets the changes for a given target version from the specified version changes object.
20 *
21 * For readability and a good overview of breaking changes, the version change data always
22 * includes the related Pull Request link. Since this data is not needed when performing the
23 * upgrade, this unused data can be removed and the changes data can be flattened into an
24 * easy iterable array.
25 */
26export declare function getChangesForTarget<T>(target: TargetVersion, data: VersionChanges<T>): T[];
27/**
28 * Gets all changes from the specified version changes object. This is helpful in case a migration
29 * rule does not distinguish data based on the target version, but for readability the
30 * upgrade data is separated for each target version.
31 */
32export declare function getAllChanges<T>(data: VersionChanges<T>): T[];
Note: See TracBrowser for help on using the repository browser.