UNPKG

1.36 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.io/license
7 */
8import * as o from '../output/output_ast';
9export declare type CompileClassMetadataFn = (metadata: R3ClassMetadata) => o.Expression;
10/**
11 * Metadata of a class which captures the original Angular decorators of a class. The original
12 * decorators are preserved in the generated code to allow TestBed APIs to recompile the class
13 * using the original decorator with a set of overrides applied.
14 */
15export interface R3ClassMetadata {
16 /**
17 * The class type for which the metadata is captured.
18 */
19 type: o.Expression;
20 /**
21 * An expression representing the Angular decorators that were applied on the class.
22 */
23 decorators: o.Expression;
24 /**
25 * An expression representing the Angular decorators applied to constructor parameters, or `null`
26 * if there is no constructor.
27 */
28 ctorParameters: o.Expression | null;
29 /**
30 * An expression representing the Angular decorators that were applied on the properties of the
31 * class, or `null` if no properties have decorators.
32 */
33 propDecorators: o.Expression | null;
34}
35export declare function compileClassMetadata(metadata: R3ClassMetadata): o.Expression;