UNPKG

394 BTypeScriptView Raw
1import type { Source } from './source';
2/**
3 * Represents a location in a Source.
4 */
5export interface SourceLocation {
6 readonly line: number;
7 readonly column: number;
8}
9/**
10 * Takes a Source and a UTF-8 character offset, and returns the corresponding
11 * line and column as a SourceLocation.
12 */
13export declare function getLocation(
14 source: Source,
15 position: number,
16): SourceLocation;