forked from sveltejs/svelte-eslint-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.ts
27 lines (24 loc) · 757 Bytes
/
script.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import type ESTree from "estree";
import type { BaseNode } from "./base.js";
import type { SvelteBindingDirective } from "./html.js";
export type SvelteScriptNode =
| SvelteReactiveStatement
| SvelteFunctionBindingsExpression;
/** Node of `$` statement. */
export interface SvelteReactiveStatement extends BaseNode {
type: "SvelteReactiveStatement";
label: ESTree.Identifier & { name: "$" };
body: ESTree.Statement;
parent: ESTree.Node;
}
/** Node of `bind:name={get, set}` expression. */
export interface SvelteFunctionBindingsExpression extends BaseNode {
type: "SvelteFunctionBindingsExpression";
expressions: [
/** Getter */
ESTree.Expression,
/** Setter */
ESTree.Expression,
];
parent: SvelteBindingDirective;
}