UNPKG

678 BTypeScriptView Raw
1import { Source } from './index';
2import { SerializedSourceSpan, SourceSpan } from './span';
3export declare type SerializedSourceSlice<Chars extends string = string> = [
4 chars: Chars,
5 span: SerializedSourceSpan
6];
7export declare class SourceSlice<Chars extends string = string> {
8 static synthetic<S extends string>(chars: S): SourceSlice<S>;
9 static load(source: Source, slice: SerializedSourceSlice): SourceSlice;
10 readonly chars: Chars;
11 readonly loc: SourceSpan;
12 constructor(options: {
13 loc: SourceSpan;
14 chars: Chars;
15 });
16 getString(): string;
17 serialize(): SerializedSourceSlice<Chars>;
18}
19//# sourceMappingURL=slice.d.ts.map
\No newline at end of file