source: trip-planner-front/node_modules/@angular/core/schematics/migrations/undecorated-classes-with-decorated-fields/transform.d.ts@ 6a3a178

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

initial commit

  • Property mode set to 100644
File size: 2.7 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 */
8/// <amd-module name="@angular/core/schematics/migrations/undecorated-classes-with-decorated-fields/transform" />
9import * as ts from 'typescript';
10import { UpdateRecorder } from './update_recorder';
11interface AnalysisFailure {
12 node: ts.Node;
13 message: string;
14}
15export declare class UndecoratedClassesWithDecoratedFieldsTransform {
16 private typeChecker;
17 private getUpdateRecorder;
18 private printer;
19 private importManager;
20 private reflectionHost;
21 private partialEvaluator;
22 constructor(typeChecker: ts.TypeChecker, getUpdateRecorder: (sf: ts.SourceFile) => UpdateRecorder);
23 /**
24 * Migrates the specified source files. The transform adds the abstract `@Directive`
25 * decorator to undecorated classes that use Angular features. Class members which
26 * are decorated with any Angular decorator, or class members for lifecycle hooks are
27 * indicating that a given class uses Angular features. https://hackmd.io/vuQfavzfRG6KUCtU7oK_EA
28 */
29 migrate(sourceFiles: ts.SourceFile[]): AnalysisFailure[];
30 /** Records all changes that were made in the import manager. */
31 recordChanges(): void;
32 /**
33 * Finds undecorated abstract directives in the specified source files. Also returns
34 * a set of undecorated classes which could not be detected as guaranteed abstract
35 * directives. Those are ambiguous and could be either Directive, Pipe or service.
36 */
37 private _findUndecoratedAbstractDirectives;
38 /**
39 * Analyzes the given class declaration by determining whether the class
40 * is a directive, is an abstract directive, or uses Angular features.
41 */
42 private _analyzeClassDeclaration;
43 /**
44 * Checks whether the given decorator resolves to an abstract directive. An directive is
45 * considered "abstract" if there is no selector specified.
46 */
47 private _isAbstractDirective;
48 /**
49 * Determines the kind of a given class in terms of Angular. The method checks
50 * whether the given class has members that indicate the use of Angular features.
51 * e.g. lifecycle hooks or decorated members like `@Input` or `@Output` are
52 * considered Angular features..
53 */
54 private _determineClassKind;
55 /**
56 * Checks whether a given class has been reported as ambiguous in previous
57 * migration run. e.g. when build targets are migrated first, and then test
58 * targets that have an overlap with build source files, the same class
59 * could be detected as ambiguous.
60 */
61 private _hasBeenReportedAsAmbiguous;
62}
63export {};
Note: See TracBrowser for help on using the repository browser.