-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.d.cts
58 lines (50 loc) · 990 Bytes
/
index.d.cts
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
/*
* wasm-pack doesn't give us correct enough types.
* this file must be manually kept in sync with ./index.d.ts
*/
interface Parsed {
type: 'expression' | 'class-member';
tagName: 'template';
contents: string;
range: {
start: number;
end: number;
};
contentRange: {
start: number;
end: number;
};
startRange: {
end: number;
start: number;
};
endRange: {
start: number;
end: number;
};
}
interface PreprocessorOptions {
/** Default is `false` */
inline_source_map?: boolean;
filename?: string;
}
/**
*/
export class Preprocessor {
free(): void;
/**
*/
constructor();
/**
* @param {string} src
* @param {PreprocessorOptions | undefined} options
* @returns {string}
*/
process(src: string, options?: PreprocessorOptions): { code: string; map: string; };
/**
* @param {string} src
* @param {PreprocessorOptions | undefined} options
* @returns {any}
*/
parse(src: string, options?: PreprocessorOptions): Parsed[];
}