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