source: trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/analysis/ngcc_trait_compiler.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.2 KB
Line 
1/// <amd-module name="@angular/compiler-cli/ngcc/src/analysis/ngcc_trait_compiler" />
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9import * as ts from 'typescript';
10import { SemanticSymbol } from '../../../src/ngtsc/incremental/semantic_graph';
11import { ClassDeclaration, Decorator } from '../../../src/ngtsc/reflection';
12import { DecoratorHandler, HandlerFlags, Trait, TraitCompiler } from '../../../src/ngtsc/transform';
13import { NgccReflectionHost } from '../host/ngcc_host';
14/**
15 * Specializes the `TraitCompiler` for ngcc purposes. Mainly, this includes an alternative way of
16 * scanning for classes to compile using the reflection host's `findClassSymbols`, together with
17 * support to inject synthetic decorators into the compilation for ad-hoc migrations that ngcc
18 * performs.
19 */
20export declare class NgccTraitCompiler extends TraitCompiler {
21 private ngccReflector;
22 constructor(handlers: DecoratorHandler<unknown, unknown, SemanticSymbol | null, unknown>[], ngccReflector: NgccReflectionHost);
23 get analyzedFiles(): ts.SourceFile[];
24 /**
25 * Analyzes the source file in search for classes to process. For any class that is found in the
26 * file, a `ClassRecord` is created and the source file is included in the `analyzedFiles` array.
27 */
28 analyzeFile(sf: ts.SourceFile): void;
29 /**
30 * Associate a new synthesized decorator, which did not appear in the original source, with a
31 * given class.
32 * @param clazz the class to receive the new decorator.
33 * @param decorator the decorator to inject.
34 * @param flags optional bitwise flag to influence the compilation of the decorator.
35 */
36 injectSyntheticDecorator(clazz: ClassDeclaration, decorator: Decorator, flags?: HandlerFlags): Trait<unknown, unknown, SemanticSymbol | null, unknown>[];
37 /**
38 * Returns all decorators that have been recognized for the provided class, including any
39 * synthetically injected decorators.
40 * @param clazz the declaration for which the decorators are returned.
41 */
42 getAllDecorators(clazz: ClassDeclaration): Decorator[] | null;
43}
Note: See TracBrowser for help on using the repository browser.