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/compiler-cli/src/ngtsc/metadata/src/dts" />
|
---|
9 | import * as ts from 'typescript';
|
---|
10 | import { Reference } from '../../imports';
|
---|
11 | import { ClassDeclaration, ReflectionHost } from '../../reflection';
|
---|
12 | import { DirectiveMeta, MetadataReader, NgModuleMeta, PipeMeta } from './api';
|
---|
13 | /**
|
---|
14 | * A `MetadataReader` that can read metadata from `.d.ts` files, which have static Ivy properties
|
---|
15 | * from an upstream compilation already.
|
---|
16 | */
|
---|
17 | export declare class DtsMetadataReader implements MetadataReader {
|
---|
18 | private checker;
|
---|
19 | private reflector;
|
---|
20 | constructor(checker: ts.TypeChecker, reflector: ReflectionHost);
|
---|
21 | /**
|
---|
22 | * Read the metadata from a class that has already been compiled somehow (either it's in a .d.ts
|
---|
23 | * file, or in a .ts file with a handwritten definition).
|
---|
24 | *
|
---|
25 | * @param ref `Reference` to the class of interest, with the context of how it was obtained.
|
---|
26 | */
|
---|
27 | getNgModuleMetadata(ref: Reference<ClassDeclaration>): NgModuleMeta | null;
|
---|
28 | /**
|
---|
29 | * Read directive (or component) metadata from a referenced class in a .d.ts file.
|
---|
30 | */
|
---|
31 | getDirectiveMetadata(ref: Reference<ClassDeclaration>): DirectiveMeta | null;
|
---|
32 | /**
|
---|
33 | * Read pipe metadata from a referenced class in a .d.ts file.
|
---|
34 | */
|
---|
35 | getPipeMetadata(ref: Reference<ClassDeclaration>): PipeMeta | null;
|
---|
36 | }
|
---|