source: trip-planner-front/node_modules/@angular/cdk/schematics/ng-update/devkit-migration.d.ts

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

initial commit

  • Property mode set to 100644
File size: 1.6 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 { SchematicContext, Tree } from '@angular-devkit/schematics';
9import { ProjectDefinition } from '@angular-devkit/core/src/workspace';
10import { Constructor, Migration, PostMigrationAction } from '../update-tool/migration';
11export declare type DevkitContext = {
12 /** Devkit tree for the current migrations. Can be used to insert/remove files. */
13 tree: Tree;
14 /** Name of the project the migrations run against. */
15 projectName: string;
16 /** Workspace project the migrations run against. */
17 project: ProjectDefinition;
18 /** Whether the migrations run for a test target. */
19 isTestTarget: boolean;
20};
21export declare abstract class DevkitMigration<Data> extends Migration<Data, DevkitContext> {
22 /** Prints an informative message with context on the current target. */
23 protected printInfo(text: string): void;
24 /**
25 * Optional static method that will be called once the migration of all project
26 * targets has been performed. This method can be used to make changes respecting the
27 * migration result of all individual targets. e.g. removing HammerJS if it
28 * is not needed in any project target.
29 */
30 static globalPostMigration?(tree: Tree, context: SchematicContext): PostMigrationAction;
31}
32export declare type DevkitMigrationCtor<Data> = Constructor<DevkitMigration<Data>> & {
33 [m in keyof typeof DevkitMigration]: (typeof DevkitMigration)[m];
34};
Note: See TracBrowser for help on using the repository browser.