[6a3a178] | 1 | /// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/util" />
|
---|
| 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 | */
|
---|
| 9 | import { R3DeclareDependencyMetadata, R3DependencyMetadata, R3ProviderExpression, R3Reference } from '@angular/compiler';
|
---|
| 10 | import * as o from '@angular/compiler/src/output/output_ast';
|
---|
| 11 | import { AstObject, AstValue } from '../../ast/ast_value';
|
---|
| 12 | export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
|
---|
| 13 | /**
|
---|
| 14 | * Parses the value of an enum from the AST value's symbol name.
|
---|
| 15 | */
|
---|
| 16 | export declare function parseEnum<TExpression, TEnum>(value: AstValue<unknown, TExpression>, Enum: TEnum): TEnum[keyof TEnum];
|
---|
| 17 | /**
|
---|
| 18 | * Parse a dependency structure from an AST object.
|
---|
| 19 | */
|
---|
| 20 | export declare function getDependency<TExpression>(depObj: AstObject<R3DeclareDependencyMetadata, TExpression>): R3DependencyMetadata;
|
---|
| 21 | /**
|
---|
| 22 | * Return an `R3ProviderExpression` that represents either the extracted type reference expression
|
---|
| 23 | * from a `forwardRef` function call, or the type itself.
|
---|
| 24 | *
|
---|
| 25 | * For example, the expression `forwardRef(function() { return FooDir; })` returns `FooDir`. Note
|
---|
| 26 | * that this expression is required to be wrapped in a closure, as otherwise the forward reference
|
---|
| 27 | * would be resolved before initialization.
|
---|
| 28 | *
|
---|
| 29 | * If there is no forwardRef call expression then we just return the opaque type.
|
---|
| 30 | */
|
---|
| 31 | export declare function extractForwardRef<TExpression>(expr: AstValue<unknown, TExpression>): R3ProviderExpression<o.WrappedNodeExpr<TExpression>>;
|
---|