UNPKG

950 BTypeScriptView Raw
1import { VueTemplateCompiler, VueTemplateCompilerOptions, ErrorWithRange } from './types';
2import { AssetURLOptions, TransformAssetUrlsOptions } from './templateCompilerModules/assetUrl';
3export interface TemplateCompileOptions {
4 source: string;
5 filename: string;
6 compiler: VueTemplateCompiler;
7 compilerOptions?: VueTemplateCompilerOptions;
8 transformAssetUrls?: AssetURLOptions | boolean;
9 transformAssetUrlsOptions?: TransformAssetUrlsOptions;
10 preprocessLang?: string;
11 preprocessOptions?: any;
12 transpileOptions?: any;
13 isProduction?: boolean;
14 isFunctional?: boolean;
15 optimizeSSR?: boolean;
16 prettify?: boolean;
17}
18export interface TemplateCompileResult {
19 ast: Object | undefined;
20 code: string;
21 source: string;
22 tips: (string | ErrorWithRange)[];
23 errors: (string | ErrorWithRange)[];
24}
25export declare function compileTemplate(options: TemplateCompileOptions): TemplateCompileResult;