UNPKG

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