UNPKG

727 BTypeScriptView 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/core/schematics/utils/line_mappings" />
9/** Gets the line and character for the given position from the line starts map. */
10export declare function getLineAndCharacterFromPosition(lineStartsMap: number[], position: number): {
11 character: number;
12 line: number;
13};
14/**
15 * Computes the line start map of the given text. This can be used in order to
16 * retrieve the line and character of a given text position index.
17 */
18export declare function computeLineStartsMap(text: string): number[];