3ce853e74cb3340b83f701231f9e04789f6fa9ddfd694190247750a3cfeb2efdbd8d70f5a07c7a540551692cce4b9b131303d255be3eb8f360a1b198bf2719 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. }