1 | interface BaseNode {
|
2 | start: number;
|
3 | end: number;
|
4 | type: string;
|
5 | children?: Node[];
|
6 | [prop_name: string]: any;
|
7 | }
|
8 | export interface Text extends BaseNode {
|
9 | type: 'Text';
|
10 | data: string;
|
11 | }
|
12 | export interface MustacheTag extends BaseNode {
|
13 | type: 'MustacheTag';
|
14 | expression: Node;
|
15 | }
|
16 | export declare type DirectiveType = 'Action' | 'Animation' | 'Binding' | 'Class' | 'EventHandler' | 'Let' | 'Ref' | 'Transition';
|
17 | interface BaseDirective extends BaseNode {
|
18 | type: DirectiveType;
|
19 | expression: null | Node;
|
20 | name: string;
|
21 | modifiers: string[];
|
22 | }
|
23 | export interface Transition extends BaseDirective {
|
24 | type: 'Transition';
|
25 | intro: boolean;
|
26 | outro: boolean;
|
27 | }
|
28 | export declare type Directive = BaseDirective | Transition;
|
29 | export declare type Node = Text | MustacheTag | BaseNode | Directive | Transition;
|
30 | export interface Parser {
|
31 | readonly template: string;
|
32 | readonly filename?: string;
|
33 | index: number;
|
34 | stack: Node[];
|
35 | html: Node;
|
36 | css: Node;
|
37 | js: Node;
|
38 | meta_tags: {};
|
39 | }
|
40 | export interface Ast {
|
41 | html: Node;
|
42 | css: Node;
|
43 | instance: Node;
|
44 | module: Node;
|
45 | }
|
46 | export interface Warning {
|
47 | start?: {
|
48 | line: number;
|
49 | column: number;
|
50 | pos?: number;
|
51 | };
|
52 | end?: {
|
53 | line: number;
|
54 | column: number;
|
55 | };
|
56 | pos?: number;
|
57 | code: string;
|
58 | message: string;
|
59 | filename?: string;
|
60 | frame?: string;
|
61 | toString: () => string;
|
62 | }
|
63 | export declare type ModuleFormat = 'esm' | 'cjs';
|
64 | export interface CompileOptions {
|
65 | format?: ModuleFormat;
|
66 | name?: string;
|
67 | filename?: string;
|
68 | generate?: string | false;
|
69 | outputFilename?: string;
|
70 | cssOutputFilename?: string;
|
71 | sveltePath?: string;
|
72 | dev?: boolean;
|
73 | accessors?: boolean;
|
74 | immutable?: boolean;
|
75 | hydratable?: boolean;
|
76 | legacy?: boolean;
|
77 | customElement?: boolean;
|
78 | tag?: string;
|
79 | css?: boolean;
|
80 | preserveComments?: boolean;
|
81 | preserveWhitespace?: boolean;
|
82 | }
|
83 | export interface ParserOptions {
|
84 | filename?: string;
|
85 | customElement?: boolean;
|
86 | }
|
87 | export interface Visitor {
|
88 | enter: (node: Node) => void;
|
89 | leave?: (node: Node) => void;
|
90 | }
|
91 | export interface AppendTarget {
|
92 | slots: Record<string, string>;
|
93 | slot_stack: string[];
|
94 | }
|
95 | export interface Var {
|
96 | name: string;
|
97 | export_name?: string;
|
98 | injected?: boolean;
|
99 | module?: boolean;
|
100 | mutated?: boolean;
|
101 | reassigned?: boolean;
|
102 | referenced?: boolean;
|
103 | writable?: boolean;
|
104 | global?: boolean;
|
105 | internal?: boolean;
|
106 | initialised?: boolean;
|
107 | hoistable?: boolean;
|
108 | subscribable?: boolean;
|
109 | is_reactive_dependency?: boolean;
|
110 | }
|
111 | export {};
|