/
types.js
52 lines (47 loc) · 1.01 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// @flow
export type MappingPosition = {|
line: number,
column: number,
|};
export type IndexedMapping<T> = {
generated: MappingPosition,
original?: MappingPosition,
source?: T,
name?: T,
...
};
export type ParsedMap = {|
sources: Array<string>,
names: Array<string>,
mappings: Array<IndexedMapping<number>>,
sourcesContent: Array<string | null>,
|};
export type VLQMap = {
+sources: $ReadOnlyArray<string>,
+sourcesContent?: $ReadOnlyArray<string | null>,
+names: $ReadOnlyArray<string>,
+mappings: string,
+version?: number,
+file?: string,
+sourceRoot?: string,
...
};
export type SourceMapStringifyOptions = {
file?: string,
sourceRoot?: string,
inlineSources?: boolean,
fs?: { readFile(path: string, encoding: string): Promise<string>, ... },
format?: 'inline' | 'string' | 'object',
/**
* @private
*/
rootDir?: string,
...
};
export type GenerateEmptyMapOptions = {
projectRoot: string,
sourceName: string,
sourceContent: string,
lineOffset?: number,
...
};