UNPKG

1.11 kBTypeScriptView Raw
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.dev/license
7 */
8import ts from 'typescript';
9import { ImportedSymbolsTracker } from '../../../../imports';
10import { ReflectionHost } from '../../../../reflection';
11/**
12 * Creates an AST transform that looks for Angular classes and transforms
13 * initializer-based declared members to work with JIT compilation.
14 *
15 * For example, an `input()` member may be transformed to add an `@Input`
16 * decorator for JIT.
17 *
18 * @param host Reflection host
19 * @param importTracker Import tracker for efficient import checking.
20 * @param isCore Whether this transforms runs against `@angular/core`.
21 * @param shouldTransformClass Optional function to check if a given class should be transformed.
22 */
23export declare function getInitializerApiJitTransform(host: ReflectionHost, importTracker: ImportedSymbolsTracker, isCore: boolean, shouldTransformClass?: (node: ts.ClassDeclaration) => boolean): ts.TransformerFactory<ts.SourceFile>;