UNPKG

874 BTypeScriptView Raw
1import { RawSourceMap, VueTemplateCompiler, VueTemplateCompilerParseOptions } from './types';
2export interface ParseOptions {
3 source: string;
4 filename?: string;
5 compiler: VueTemplateCompiler;
6 compilerParseOptions?: VueTemplateCompilerParseOptions;
7 sourceRoot?: string;
8 needMap?: boolean;
9}
10export interface SFCCustomBlock {
11 type: string;
12 content: string;
13 attrs: {
14 [key: string]: string | true;
15 };
16 start: number;
17 end: number;
18 map?: RawSourceMap;
19}
20export interface SFCBlock extends SFCCustomBlock {
21 lang?: string;
22 src?: string;
23 scoped?: boolean;
24 module?: string | boolean;
25}
26export interface SFCDescriptor {
27 template: SFCBlock | null;
28 script: SFCBlock | null;
29 styles: SFCBlock[];
30 customBlocks: SFCCustomBlock[];
31}
32export declare function parse(options: ParseOptions): SFCDescriptor;