source: trip-planner-front/node_modules/@angular/compiler-cli/linker/babel/src/babel_declaration_scope.d.ts@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/// <amd-module name="@angular/compiler-cli/linker/babel/src/babel_declaration_scope" />
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 */
9import { NodePath, Scope } from '@babel/traverse';
10import * as t from '@babel/types';
11import { DeclarationScope } from '../../../linker';
12export declare type ConstantScopePath = NodePath<t.Function | t.Program>;
13/**
14 * This class represents the lexical scope of a partial declaration in Babel source code.
15 *
16 * Its only responsibility is to compute a reference object for the scope of shared constant
17 * statements that will be generated during partial linking.
18 */
19export declare class BabelDeclarationScope implements DeclarationScope<ConstantScopePath, t.Expression> {
20 private declarationScope;
21 /**
22 * Construct a new `BabelDeclarationScope`.
23 *
24 * @param declarationScope the Babel scope containing the declaration call expression.
25 */
26 constructor(declarationScope: Scope);
27 /**
28 * Compute the Babel `NodePath` that can be used to reference the lexical scope where any
29 * shared constant statements would be inserted.
30 *
31 * There will only be a shared constant scope if the expression is in an ECMAScript module, or a
32 * UMD module. Otherwise `null` is returned to indicate that constant statements must be emitted
33 * locally to the generated linked definition, to avoid polluting the global scope.
34 *
35 * @param expression the expression that points to the Angular core framework import.
36 */
37 getConstantScopeRef(expression: t.Expression): ConstantScopePath | null;
38}
Note: See TracBrowser for help on using the repository browser.