File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
- import { VueTemplateCompiler , VueTemplateCompilerOptions } from './types'
1
+ import {
2
+ VueTemplateCompiler ,
3
+ VueTemplateCompilerOptions ,
4
+ ErrorWithRange
5
+ } from './types'
2
6
3
7
import assetUrlsModule , {
4
8
AssetURLOptions
@@ -26,8 +30,8 @@ export interface TemplateCompileOptions {
26
30
export interface TemplateCompileResult {
27
31
code : string
28
32
source : string
29
- tips : string [ ]
30
- errors : string [ ]
33
+ tips : ( string | ErrorWithRange ) [ ]
34
+ errors : ( string | ErrorWithRange ) [ ]
31
35
}
32
36
33
37
export function compileTemplate (
Original file line number Diff line number Diff line change @@ -32,16 +32,23 @@ export interface VueTemplateCompiler {
32
32
// part of the vue monorepo.
33
33
export interface VueTemplateCompilerOptions {
34
34
modules ?: Object [ ]
35
+ outputSourceRange ?: boolean
35
36
}
36
37
37
38
export interface VueTemplateCompilerParseOptions {
38
39
pad ?: 'line' | 'space'
39
40
}
40
41
42
+ export interface ErrorWithRange {
43
+ msg : string
44
+ start : number
45
+ end : number
46
+ }
47
+
41
48
export interface VueTemplateCompilerResults {
42
49
ast : Object | void
43
50
render : string
44
51
staticRenderFns : string [ ]
45
- errors : string [ ]
46
- tips : string [ ]
52
+ errors : ( string | ErrorWithRange ) [ ]
53
+ tips : ( string | ErrorWithRange ) [ ]
47
54
}
You can’t perform that action at this time.
0 commit comments