1 | import type { Option } from '@glimmer/interfaces';
|
2 | import { SourceLocation, SourcePosition } from './location';
|
3 | import { SourceOffset, SourceSpan } from './span';
|
4 | export declare class Source {
|
5 | readonly source: string;
|
6 | readonly module: string;
|
7 | constructor(source: string, module?: string);
|
8 | /**
|
9 | * Validate that the character offset represents a position in the source string.
|
10 | */
|
11 | check(offset: number): boolean;
|
12 | slice(start: number, end: number): string;
|
13 | offsetFor(line: number, column: number): SourceOffset;
|
14 | spanFor({ start, end }: Readonly<SourceLocation>): SourceSpan;
|
15 | hbsPosFor(offset: number): Option<SourcePosition>;
|
16 | charPosFor(position: SourcePosition): number | null;
|
17 | }
|
18 |
|
\ | No newline at end of file |