UNPKG

1.04 kBTypeScriptView Raw
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/language-service/ivy/hybrid_visitor" />
9import * as e from '@angular/compiler/src/expression_parser/ast';
10import * as t from '@angular/compiler/src/render3/r3_ast';
11/**
12 * Return the path to the template AST node or expression AST node that most accurately
13 * represents the node at the specified cursor `position`.
14 *
15 * @param ast AST tree
16 * @param position cursor position
17 */
18export declare function getPathToNodeAtPosition(ast: t.Node[], position: number): Array<t.Node | e.AST> | undefined;
19/**
20 * Return the template AST node or expression AST node that most accurately
21 * represents the node at the specified cursor `position`.
22 *
23 * @param ast AST tree
24 * @param position cursor position
25 */
26export declare function findNodeAtPosition(ast: t.Node[], position: number): t.Node | e.AST | undefined;