-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.d.ts
70 lines (68 loc) · 1.93 KB
/
index.d.ts
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export class ExternalObject<T> {
readonly '': {
readonly '': unique symbol
[K: symbol]: T
}
}
/** Only for .d.ts type generation */
export interface DecodedMap {
file?: string | undefined | null
sources: Array<string | undefined | null>
sourceRoot?: string | undefined | null
sourcesContent: Array<string | undefined | null>
names: Array<string>
mappings: Array<Array<Array<number>>>
}
/** Only for .d.ts generation */
export interface GenerateDecodedMapOptions {
file?: string | undefined | null
sourceRoot?: string | undefined | null
source?: string | undefined | null
includeContent: boolean
hires: boolean
}
/** Only for .d.ts generation */
export interface OverwriteOptions {
contentOnly: boolean
}
export class MagicString {
constructor(originalStr: string)
append(input: string): this
prepend(input: string): this
appendLeft(index: number, input: string): this
appendRight(index: number, input: string): this
prependLeft(index: number, input: string): this
prependRight(index: number, input: string): this
overwrite(
start: number,
end: number,
content: string,
options?: OverwriteOptions,
): this
trim(pattern?: string | undefined | null): this
trimStart(pattern?: string | undefined | null): this
trimEnd(pattern?: string | undefined | null): this
trimLines(): this
remove(start: number, end: number): this
move(start: number, end: number, index: number): this
isEmpty(): boolean
generateMap(options?: Partial<GenerateDecodedMapOptions>): {
toString: () => string
toUrl: () => string
toMap: () => {
version: number
file?: string
sources: string[]
sourcesContent: string[]
names: string[]
mappings: string
sourceRoot?: string
}
}
generateDecodedMap(options?: Partial<GenerateDecodedMapOptions>): DecodedMap
toString(): string
length(): number
}