Debian Codegraph @

jridgewell-gen-mapping/src/types.ts

raw
1 import type { SourceMapSegment } from './sourcemap-segment';
2
3 export interface SourceMapV3 {
4 file?: string | null;
5 names: readonly string[];
6 sourceRoot?: string;
7 sources: readonly (string | null)[];
8 sourcesContent?: readonly (string | null)[];
9 version: 3;
10 }
11
12 export interface EncodedSourceMap extends SourceMapV3 {
13 mappings: string;
14 }
15
16 export interface DecodedSourceMap extends SourceMapV3 {
17 mappings: readonly SourceMapSegment[][];
18 }
19
20 export interface Pos {
21 line: number;
22 column: number;
23 }
24
25 export type Mapping =
26 | {
27 generated: Pos;
28 source: undefined;
29 original: undefined;
30 name: undefined;
31 }
32 | {
33 generated: Pos;
34 source: string;
35 original: Pos;
36 name: string;
37 }
38 | {
39 generated: Pos;
40 source: string;
41 original: Pos;
42 name: undefined;
43 };