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/linker/babel/src/ast/babel_ast_host" />
|
---|
9 | import * as t from '@babel/types';
|
---|
10 | import { AstHost, Range } from '../../../../linker';
|
---|
11 | /**
|
---|
12 | * This implementation of `AstHost` is able to get information from Babel AST nodes.
|
---|
13 | */
|
---|
14 | export declare class BabelAstHost implements AstHost<t.Expression> {
|
---|
15 | getSymbolName(node: t.Expression): string | null;
|
---|
16 | isStringLiteral: typeof t.isStringLiteral;
|
---|
17 | parseStringLiteral(str: t.Expression): string;
|
---|
18 | isNumericLiteral: typeof t.isNumericLiteral;
|
---|
19 | parseNumericLiteral(num: t.Expression): number;
|
---|
20 | isBooleanLiteral(bool: t.Expression): boolean;
|
---|
21 | parseBooleanLiteral(bool: t.Expression): boolean;
|
---|
22 | isArrayLiteral: typeof t.isArrayExpression;
|
---|
23 | parseArrayLiteral(array: t.Expression): t.Expression[];
|
---|
24 | isObjectLiteral: typeof t.isObjectExpression;
|
---|
25 | parseObjectLiteral(obj: t.Expression): Map<string, t.Expression>;
|
---|
26 | isFunctionExpression(node: t.Expression): node is Extract<t.Function, t.Expression>;
|
---|
27 | parseReturnValue(fn: t.Expression): t.Expression;
|
---|
28 | isCallExpression: typeof t.isCallExpression;
|
---|
29 | parseCallee(call: t.Expression): t.Expression;
|
---|
30 | parseArguments(call: t.Expression): t.Expression[];
|
---|
31 | getRange(node: t.Expression): Range;
|
---|
32 | }
|
---|