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/ngcc/src/analysis/ngcc_references_registry" />
|
---|
9 | import * as ts from 'typescript';
|
---|
10 | import { ReferencesRegistry } from '../../../src/ngtsc/annotations';
|
---|
11 | import { Reference } from '../../../src/ngtsc/imports';
|
---|
12 | import { Declaration, DeclarationNode, ReflectionHost } from '../../../src/ngtsc/reflection';
|
---|
13 | /**
|
---|
14 | * This is a place for DecoratorHandlers to register references that they
|
---|
15 | * find in their analysis of the code.
|
---|
16 | *
|
---|
17 | * This registry is used to ensure that these references are publicly exported
|
---|
18 | * from libraries that are compiled by ngcc.
|
---|
19 | */
|
---|
20 | export declare class NgccReferencesRegistry implements ReferencesRegistry {
|
---|
21 | private host;
|
---|
22 | private map;
|
---|
23 | constructor(host: ReflectionHost);
|
---|
24 | /**
|
---|
25 | * Register one or more references in the registry.
|
---|
26 | * Only `ResolveReference` references are stored. Other types are ignored.
|
---|
27 | * @param references A collection of references to register.
|
---|
28 | */
|
---|
29 | add(source: DeclarationNode, ...references: Reference<DeclarationNode>[]): void;
|
---|
30 | /**
|
---|
31 | * Create and return a mapping for the registered resolved references.
|
---|
32 | * @returns A map of reference identifiers to reference declarations.
|
---|
33 | */
|
---|
34 | getDeclarationMap(): Map<ts.Identifier, Declaration>;
|
---|
35 | }
|
---|