1 | import { SFCDescriptor } from './parse'
|
2 |
|
3 | export interface StartOfSourceMap {
|
4 | file?: string
|
5 | sourceRoot?: string
|
6 | }
|
7 |
|
8 | export interface RawSourceMap extends StartOfSourceMap {
|
9 | version: string
|
10 | sources: string[]
|
11 | names: string[]
|
12 | sourcesContent?: string[]
|
13 | mappings: string
|
14 | }
|
15 |
|
16 | export interface VueTemplateCompiler {
|
17 | parseComponent(source: string, options?: any): SFCDescriptor
|
18 |
|
19 | compile(
|
20 | template: string,
|
21 | options: VueTemplateCompilerOptions
|
22 | ): VueTemplateCompilerResults
|
23 |
|
24 | ssrCompile(
|
25 | template: string,
|
26 | options: VueTemplateCompilerOptions
|
27 | ): VueTemplateCompilerResults
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | export interface VueTemplateCompilerOptions {
|
34 | modules?: Object[]
|
35 | outputSourceRange?: boolean
|
36 | whitespace?: 'preserve' | 'condense'
|
37 | directives?: { [key: string]: Function }
|
38 | }
|
39 |
|
40 | export interface VueTemplateCompilerParseOptions {
|
41 | pad?: 'line' | 'space'
|
42 | }
|
43 |
|
44 | export interface ErrorWithRange {
|
45 | msg: string
|
46 | start: number
|
47 | end: number
|
48 | }
|
49 |
|
50 | export interface VueTemplateCompilerResults {
|
51 | ast: Object | undefined
|
52 | render: string
|
53 | staticRenderFns: string[]
|
54 | errors: (string | ErrorWithRange)[]
|
55 | tips: (string | ErrorWithRange)[]
|
56 | }
|