Create new
Bindings
Transitions
Animations
Easing
Component composition
Context API
Special elements
Module context
Debugging
Miscellaneous
App.svelte
runes
This component is in runes mode.
To disable runes mode, add the following to the top of your component:
<svelte:options runes={false} />
99
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
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
⌄
⌄
⌄
<!-- https://eugenkiss.github.io/7guis/tasks/#flight -->
<script>
const tomorrow = new Date(Date.now() + 86400000);
let start = $state([
tomorrow.getFullYear(),
pad(tomorrow.getMonth() + 1, 2),
pad(tomorrow.getDate(), 2)
].join('-'));
// svelte-ignore state_referenced_locally
let end = $state(start);
let isReturn = $state(false);
let startDate = $derived(convertToDate(start));
let endDate = $derived(convertToDate(end));
function bookFlight() {
const type = isReturn ? 'return' : 'one-way';
let message = `You have booked a ${type} flight, leaving ${startDate.toDateString()}`;
if (type === 'return') {
message += ` and returning ${endDate.toDateString()}`;
}
alert(message);
}
function convertToDate(str) {
const split = str.split('-');
return new Date(+split[0], +split[1] - 1, +split[2]);
}
function pad(x, len) {
x = String(x);
while (x.length < len) x = `0${x}`;
Error compiling component
WebAssembly.instantiateStreaming(): value type opcode @+13
99
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
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
⌄
⌄
import 'svelte/internal/disclose-version';
import * as $ from 'svelte/internal/client';
var root = $.template(`<select class="svelte-1l38rkk"><option>one-way flight</option><option>return flight</option></select> <input type="date" class="svelte-1l38rkk"> <input type="date" class="svelte-1l38rkk"> <button class="svelte-1l38rkk">book</button>`, 1);
export default function App($$anchor, $$props) {
$.push($$props, true);
const tomorrow = new Date(Date.now() + 86400000);
let start = $.state($.proxy([
tomorrow.getFullYear(),
pad(tomorrow.getMonth() + 1, 2),
pad(tomorrow.getDate(), 2)
].join('-')));
// svelte-ignore state_referenced_locally
let end = $.state($.proxy($.get(start)));
let isReturn = $.state(false);
let startDate = $.derived(() => convertToDate($.get(start)));
let endDate = $.derived(() => convertToDate($.get(end)));
function bookFlight() {
const type = $.get(isReturn) ? 'return' : 'one-way';
let message = `You have booked a ${type} flight, leaving ${$.get(startDate).toDateString()}`;
if (type === 'return') {
message += ` and returning ${$.get(endDate).toDateString()}`;
}
alert(message);
}
function convertToDate(str) {
const split = str.split('-');
result = svelte.compile(source, {
generate: ,
});9
1
2
3
4
5
6
7
8
9
›
select.svelte-1l38rkk,
input.svelte-1l38rkk,
button.svelte-1l38rkk {
display: block;
margin: 0.5em 0;
font-size: inherit;
}
Root {
css: StyleSheet {...}
- type: "StyleSheet"
- start: 1269
- end: 1374
- attributes: []
children: [...] (1)
Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1278
- end: 1301
children: [...] (3)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1278
- end: 1284
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "select"
- start: 1278
- end: 1284
}
]- start: 1278
- end: 1284
}
]
} ComplexSelector {...}
- type: "ComplexSelector"
- start: 1287
- end: 1292
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "input"
- start: 1287
- end: 1292
}
]- start: 1287
- end: 1292
}
]
} ComplexSelector {...}
- type: "ComplexSelector"
- start: 1295
- end: 1301
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "button"
- start: 1295
- end: 1301
}
]- start: 1295
- end: 1301
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1302
- end: 1365
children: [...] (3)
Declaration {...}
- type: "Declaration"
- start: 1306
- end: 1320
- property: "display"
- value: "block"
} Declaration {...}
- type: "Declaration"
- start: 1324
- end: 1339
- property: "margin"
- value: "0.5em 0"
} Declaration {...}
- type: "Declaration"
- start: 1343
- end: 1361
- property: "font-size"
- value: "inherit"
}
]
}- start: 1278
- end: 1365
}
]content: {...}
- start: 1276
- end: 1366
- styles: "\n\tselect,\n\tinput,\n\tbutton {\n\t\tdisplay: block;\n\t\tmargin: 0.5em 0;\n\t\tfont-size: inherit;\n\t}\n"
- comment: null
}
}- js: []
- start: 0
- end: 1267
- type: "Root"
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (11)
Comment {...}
- type: "Comment"
- start: 0
- end: 56
- data: " https://eugenkiss.github.io/7guis/tasks/#flight "
} Text {...}
- type: "Text"
- start: 56
- end: 57
- raw: "\n"
- data: "\n"
} Text {...}
- type: "Text"
- start: 943
- end: 945
- raw: "\n\n"
- data: "\n\n"
} RegularElement {...}
- type: "RegularElement"
- start: 945
- end: 1077
- name: "select"
attributes: [...] (2)
BindDirective {...}
- start: 953
- end: 974
- type: "BindDirective"
- name: "value"
expression: Identifier {...}
- type: "Identifier"
- start: 965
- end: 973
loc: {...}
start: {...}
- line: 41
- column: 20
}end: {...}
- line: 41
- column: 28
}
}- name: "isReturn"
}- modifiers: []
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-1l38rkk"
- raw: "svelte-1l38rkk"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 975
- end: 977
- raw: "\n\t"
- data: "\n\t"
} RegularElement {...}
- type: "RegularElement"
- start: 977
- end: 1022
- name: "option"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 985
- end: 998
- name: "value"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 991
- end: 998
expression: Literal {...}
- type: "Literal"
- start: 992
- end: 997
loc: {...}
start: {...}
- line: 42
- column: 16
}end: {...}
- line: 42
- column: 21
}
}- value: false
- raw: "false"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
Text {...}
- type: "Text"
- start: 999
- end: 1013
- raw: "one-way flight"
- data: "one-way flight"
}
]
}
} Text {...}
- type: "Text"
- start: 1022
- end: 1024
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 1024
- end: 1067
- name: "option"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 1032
- end: 1044
- name: "value"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1038
- end: 1044
expression: Literal {...}
- type: "Literal"
- start: 1039
- end: 1043
loc: {...}
start: {...}
- line: 43
- column: 16
}end: {...}
- line: 43
- column: 20
}
}- value: true
- raw: "true"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
Text {...}
- type: "Text"
- start: 1045
- end: 1058
- raw: "return flight"
- data: "return flight"
}
]
}
} Text {...}
- type: "Text"
- start: 1067
- end: 1068
- raw: "\n"
- data: "\n"
}
]
}
} Text {...}
- type: "Text"
- start: 1077
- end: 1079
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 1079
- end: 1119
- name: "input"
attributes: [...] (3)
Attribute {...}
- type: "Attribute"
- start: 1086
- end: 1097
- name: "type"
value: [...] (1)
Text {...}
- start: 1092
- end: 1096
- type: "Text"
- raw: "date"
- data: "date"
}
]
} BindDirective {...}
- start: 1098
- end: 1116
- type: "BindDirective"
- name: "value"
expression: Identifier {...}
- type: "Identifier"
- start: 1110
- end: 1115
loc: {...}
start: {...}
- line: 46
- column: 31
}end: {...}
- line: 46
- column: 36
}
}- name: "start"
}- modifiers: []
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-1l38rkk"
- raw: "svelte-1l38rkk"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 1119
- end: 1120
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 1120
- end: 1179
- name: "input"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 1127
- end: 1138
- name: "type"
value: [...] (1)
Text {...}
- start: 1133
- end: 1137
- type: "Text"
- raw: "date"
- data: "date"
}
]
} BindDirective {...}
- start: 1139
- end: 1155
- type: "BindDirective"
- name: "value"
expression: Identifier {...}
- type: "Identifier"
- start: 1151
- end: 1154
loc: {...}
start: {...}
- line: 47
- column: 31
}end: {...}
- line: 47
- column: 34
}
}- name: "end"
}- modifiers: []
} Attribute {...}
- type: "Attribute"
- start: 1156
- end: 1176
- name: "disabled"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1165
- end: 1176
expression: UnaryExpression {...}
- type: "UnaryExpression"
- start: 1166
- end: 1175
loc: {...}
start: {...}
- line: 47
- column: 46
}end: {...}
- line: 47
- column: 55
}
}- operator: "!"
- prefix: true
argument: Identifier {...}
- type: "Identifier"
- start: 1167
- end: 1175
loc: {...}
start: {...}
- line: 47
- column: 47
}end: {...}
- line: 47
- column: 55
}
}- name: "isReturn"
}
}
}
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-1l38rkk"
- raw: "svelte-1l38rkk"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 1179
- end: 1181
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 1181
- end: 1267
- name: "button"
attributes: [...] (3)
Attribute {...}
- type: "Attribute"
- start: 1189
- end: 1209
- name: "onclick"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1197
- end: 1209
expression: Identifier {...}
- type: "Identifier"
- start: 1198
- end: 1208
loc: {...}
start: {...}
- line: 49
- column: 17
}end: {...}
- line: 49
- column: 27
}
}- name: "bookFlight"
}
}
} Attribute {...}
- type: "Attribute"
- start: 1210
- end: 1253
- name: "disabled"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1219
- end: 1253
expression: LogicalExpression {...}
- type: "LogicalExpression"
- start: 1220
- end: 1252
loc: {...}
start: {...}
- line: 49
- column: 39
}end: {...}
- line: 49
- column: 71
}
}left: Identifier {...}
- type: "Identifier"
- start: 1220
- end: 1228
loc: {...}
start: {...}
- line: 49
- column: 39
}end: {...}
- line: 49
- column: 47
}
}- name: "isReturn"
}- operator: "&&"
right: BinaryExpression {...}
- type: "BinaryExpression"
- start: 1232
- end: 1252
loc: {...}
start: {...}
- line: 49
- column: 51
}end: {...}
- line: 49
- column: 71
}
}left: Identifier {...}
- type: "Identifier"
- start: 1232
- end: 1241
loc: {...}
start: {...}
- line: 49
- column: 51
}end: {...}
- line: 49
- column: 60
}
}- name: "startDate"
}- operator: ">="
right: Identifier {...}
- type: "Identifier"
- start: 1245
- end: 1252
loc: {...}
start: {...}
- line: 49
- column: 64
}end: {...}
- line: 49
- column: 71
}
}- name: "endDate"
}
}
}
}
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-1l38rkk"
- raw: "svelte-1l38rkk"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
Text {...}
- type: "Text"
- start: 1254
- end: 1258
- raw: "book"
- data: "book"
}
]
}
} Text {...}
- type: "Text"
- start: 1267
- end: 1269
- raw: "\n\n"
- data: "\n\n"
}
]
}- options: null
instance: Script {...}
- type: "Script"
- start: 57
- end: 943
- context: "default"
content: Program {...}
- type: "Program"
- start: 65
- end: 934
loc: {...}
start: {...}
- line: 1
- column: 0
}end: {...}
- line: 39
- column: 0
}
}body: [...] (9)
VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 67
- end: 116
loc: {...}
start: {...}
- line: 3
- column: 1
}end: {...}
- line: 3
- column: 50
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 73
- end: 115
loc: {...}
start: {...}
- line: 3
- column: 7
}end: {...}
- line: 3
- column: 49
}
}id: Identifier {...}
- type: "Identifier"
- start: 73
- end: 81
loc: {...}
start: {...}
- line: 3
- column: 7
}end: {...}
- line: 3
- column: 15
}
}- name: "tomorrow"
}init: NewExpression {...}
- type: "NewExpression"
- start: 84
- end: 115
loc: {...}
start: {...}
- line: 3
- column: 18
}end: {...}
- line: 3
- column: 49
}
}callee: Identifier {...}
- type: "Identifier"
- start: 88
- end: 92
loc: {...}
start: {...}
- line: 3
- column: 22
}end: {...}
- line: 3
- column: 26
}
}- name: "Date"
}arguments: [...] (1)
BinaryExpression {...}
- type: "BinaryExpression"
- start: 93
- end: 114
loc: {...}
start: {...}
- line: 3
- column: 27
}end: {...}
- line: 3
- column: 48
}
}left: CallExpression {...}
- type: "CallExpression"
- start: 93
- end: 103
loc: {...}
start: {...}
- line: 3
- column: 27
}end: {...}
- line: 3
- column: 37
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 93
- end: 101
loc: {...}
start: {...}
- line: 3
- column: 27
}end: {...}
- line: 3
- column: 35
}
}object: Identifier {...}
- type: "Identifier"
- start: 93
- end: 97
loc: {...}
start: {...}
- line: 3
- column: 27
}end: {...}
- line: 3
- column: 31
}
}- name: "Date"
}property: Identifier {...}
- type: "Identifier"
- start: 98
- end: 101
loc: {...}
start: {...}
- line: 3
- column: 32
}end: {...}
- line: 3
- column: 35
}
}- name: "now"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}- operator: "+"
right: Literal {...}
- type: "Literal"
- start: 106
- end: 114
loc: {...}
start: {...}
- line: 3
- column: 40
}end: {...}
- line: 3
- column: 48
}
}- value: 86400000
- raw: "86400000"
}
}
]
}
}
]- kind: "const"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 119
- end: 244
loc: {...}
start: {...}
- line: 5
- column: 1
}end: {...}
- line: 9
- column: 14
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 123
- end: 243
loc: {...}
start: {...}
- line: 5
- column: 5
}end: {...}
- line: 9
- column: 13
}
}id: Identifier {...}
- type: "Identifier"
- start: 123
- end: 128
loc: {...}
start: {...}
- line: 5
- column: 5
}end: {...}
- line: 5
- column: 10
}
}- name: "start"
}init: CallExpression {...}
- type: "CallExpression"
- start: 131
- end: 243
loc: {...}
start: {...}
- line: 5
- column: 13
}end: {...}
- line: 9
- column: 13
}
}callee: Identifier {...}
- type: "Identifier"
- start: 131
- end: 137
loc: {...}
start: {...}
- line: 5
- column: 13
}end: {...}
- line: 5
- column: 19
}
}- name: "$state"
}arguments: [...] (1)
CallExpression {...}
- type: "CallExpression"
- start: 138
- end: 242
loc: {...}
start: {...}
- line: 5
- column: 20
}end: {...}
- line: 9
- column: 12
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 138
- end: 237
loc: {...}
start: {...}
- line: 5
- column: 20
}end: {...}
- line: 9
- column: 7
}
}object: ArrayExpression {...}
- type: "ArrayExpression"
- start: 138
- end: 232
loc: {...}
start: {...}
- line: 5
- column: 20
}end: {...}
- line: 9
- column: 2
}
}elements: [...] (3)
CallExpression {...}
- type: "CallExpression"
- start: 142
- end: 164
loc: {...}
start: {...}
- line: 6
- column: 2
}end: {...}
- line: 6
- column: 24
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 142
- end: 162
loc: {...}
start: {...}
- line: 6
- column: 2
}end: {...}
- line: 6
- column: 22
}
}object: Identifier {...}
- type: "Identifier"
- start: 142
- end: 150
loc: {...}
start: {...}
- line: 6
- column: 2
}end: {...}
- line: 6
- column: 10
}
}- name: "tomorrow"
}property: Identifier {...}
- type: "Identifier"
- start: 151
- end: 162
loc: {...}
start: {...}
- line: 6
- column: 11
}end: {...}
- line: 6
- column: 22
}
}- name: "getFullYear"
}- computed: false
- optional: false
}- arguments: []
- optional: false
} CallExpression {...}
- type: "CallExpression"
- start: 168
- end: 199
loc: {...}
start: {...}
- line: 7
- column: 2
}end: {...}
- line: 7
- column: 33
}
}callee: Identifier {...}
- type: "Identifier"
- start: 168
- end: 171
loc: {...}
start: {...}
- line: 7
- column: 2
}end: {...}
- line: 7
- column: 5
}
}- name: "pad"
}arguments: [...] (2)
BinaryExpression {...}
- type: "BinaryExpression"
- start: 172
- end: 195
loc: {...}
start: {...}
- line: 7
- column: 6
}end: {...}
- line: 7
- column: 29
}
}left: CallExpression {...}
- type: "CallExpression"
- start: 172
- end: 191
loc: {...}
start: {...}
- line: 7
- column: 6
}end: {...}
- line: 7
- column: 25
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 172
- end: 189
loc: {...}
start: {...}
- line: 7
- column: 6
}end: {...}
- line: 7
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 172
- end: 180
loc: {...}
start: {...}
- line: 7
- column: 6
}end: {...}
- line: 7
- column: 14
}
}- name: "tomorrow"
}property: Identifier {...}
- type: "Identifier"
- start: 181
- end: 189
loc: {...}
start: {...}
- line: 7
- column: 15
}end: {...}
- line: 7
- column: 23
}
}- name: "getMonth"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}- operator: "+"
right: Literal {...}
- type: "Literal"
- start: 194
- end: 195
loc: {...}
start: {...}
- line: 7
- column: 28
}end: {...}
- line: 7
- column: 29
}
}- value: 1
- raw: "1"
}
} Literal {...}
- type: "Literal"
- start: 197
- end: 198
loc: {...}
start: {...}
- line: 7
- column: 31
}end: {...}
- line: 7
- column: 32
}
}- value: 2
- raw: "2"
}
]- optional: false
} CallExpression {...}
- type: "CallExpression"
- start: 203
- end: 229
loc: {...}
start: {...}
- line: 8
- column: 2
}end: {...}
- line: 8
- column: 28
}
}callee: Identifier {...}
- type: "Identifier"
- start: 203
- end: 206
loc: {...}
start: {...}
- line: 8
- column: 2
}end: {...}
- line: 8
- column: 5
}
}- name: "pad"
}arguments: [...] (2)
CallExpression {...}
- type: "CallExpression"
- start: 207
- end: 225
loc: {...}
start: {...}
- line: 8
- column: 6
}end: {...}
- line: 8
- column: 24
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 207
- end: 223
loc: {...}
start: {...}
- line: 8
- column: 6
}end: {...}
- line: 8
- column: 22
}
}object: Identifier {...}
- type: "Identifier"
- start: 207
- end: 215
loc: {...}
start: {...}
- line: 8
- column: 6
}end: {...}
- line: 8
- column: 14
}
}- name: "tomorrow"
}property: Identifier {...}
- type: "Identifier"
- start: 216
- end: 223
loc: {...}
start: {...}
- line: 8
- column: 15
}end: {...}
- line: 8
- column: 22
}
}- name: "getDate"
}- computed: false
- optional: false
}- arguments: []
- optional: false
} Literal {...}
- type: "Literal"
- start: 227
- end: 228
loc: {...}
start: {...}
- line: 8
- column: 26
}end: {...}
- line: 8
- column: 27
}
}- value: 2
- raw: "2"
}
]- optional: false
}
]
}property: Identifier {...}
- type: "Identifier"
- start: 233
- end: 237
loc: {...}
start: {...}
- line: 9
- column: 3
}end: {...}
- line: 9
- column: 7
}
}- name: "join"
}- computed: false
- optional: false
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 238
- end: 241
loc: {...}
start: {...}
- line: 9
- column: 8
}end: {...}
- line: 9
- column: 11
}
}- value: "-"
- raw: "'-'"
}
]- optional: false
}
]- optional: false
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 290
- end: 314
loc: {...}
start: {...}
- line: 12
- column: 1
}end: {...}
- line: 12
- column: 25
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 294
- end: 313
loc: {...}
start: {...}
- line: 12
- column: 5
}end: {...}
- line: 12
- column: 24
}
}id: Identifier {...}
- type: "Identifier"
- start: 294
- end: 297
loc: {...}
start: {...}
- line: 12
- column: 5
}end: {...}
- line: 12
- column: 8
}
}- name: "end"
}init: CallExpression {...}
- type: "CallExpression"
- start: 300
- end: 313
loc: {...}
start: {...}
- line: 12
- column: 11
}end: {...}
- line: 12
- column: 24
}
}callee: Identifier {...}
- type: "Identifier"
- start: 300
- end: 306
loc: {...}
start: {...}
- line: 12
- column: 11
}end: {...}
- line: 12
- column: 17
}
}- name: "$state"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 307
- end: 312
loc: {...}
start: {...}
- line: 12
- column: 18
}end: {...}
- line: 12
- column: 23
}
}- name: "start"
}
]- optional: false
}
}
]- kind: "let"
leadingComments: [...] (1)
Line {...}
- type: "Line"
- value: " svelte-ignore state_referenced_locally"
- start: 247
- end: 288
}
]
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 316
- end: 345
loc: {...}
start: {...}
- line: 13
- column: 1
}end: {...}
- line: 13
- column: 30
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 320
- end: 344
loc: {...}
start: {...}
- line: 13
- column: 5
}end: {...}
- line: 13
- column: 29
}
}id: Identifier {...}
- type: "Identifier"
- start: 320
- end: 328
loc: {...}
start: {...}
- line: 13
- column: 5
}end: {...}
- line: 13
- column: 13
}
}- name: "isReturn"
}init: CallExpression {...}
- type: "CallExpression"
- start: 331
- end: 344
loc: {...}
start: {...}
- line: 13
- column: 16
}end: {...}
- line: 13
- column: 29
}
}callee: Identifier {...}
- type: "Identifier"
- start: 331
- end: 337
loc: {...}
start: {...}
- line: 13
- column: 16
}end: {...}
- line: 13
- column: 22
}
}- name: "$state"
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 338
- end: 343
loc: {...}
start: {...}
- line: 13
- column: 23
}end: {...}
- line: 13
- column: 28
}
}- value: false
- raw: "false"
}
]- optional: false
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 348
- end: 395
loc: {...}
start: {...}
- line: 15
- column: 1
}end: {...}
- line: 15
- column: 48
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 352
- end: 394
loc: {...}
start: {...}
- line: 15
- column: 5
}end: {...}
- line: 15
- column: 47
}
}id: Identifier {...}
- type: "Identifier"
- start: 352
- end: 361
loc: {...}
start: {...}
- line: 15
- column: 5
}end: {...}
- line: 15
- column: 14
}
}- name: "startDate"
}init: CallExpression {...}
- type: "CallExpression"
- start: 364
- end: 394
loc: {...}
start: {...}
- line: 15
- column: 17
}end: {...}
- line: 15
- column: 47
}
}callee: Identifier {...}
- type: "Identifier"
- start: 364
- end: 372
loc: {...}
start: {...}
- line: 15
- column: 17
}end: {...}
- line: 15
- column: 25
}
}- name: "$derived"
}arguments: [...] (1)
CallExpression {...}
- type: "CallExpression"
- start: 373
- end: 393
loc: {...}
start: {...}
- line: 15
- column: 26
}end: {...}
- line: 15
- column: 46
}
}callee: Identifier {...}
- type: "Identifier"
- start: 373
- end: 386
loc: {...}
start: {...}
- line: 15
- column: 26
}end: {...}
- line: 15
- column: 39
}
}- name: "convertToDate"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 387
- end: 392
loc: {...}
start: {...}
- line: 15
- column: 40
}end: {...}
- line: 15
- column: 45
}
}- name: "start"
}
]- optional: false
}
]- optional: false
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 397
- end: 440
loc: {...}
start: {...}
- line: 16
- column: 1
}end: {...}
- line: 16
- column: 44
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 401
- end: 439
loc: {...}
start: {...}
- line: 16
- column: 5
}end: {...}
- line: 16
- column: 43
}
}id: Identifier {...}
- type: "Identifier"
- start: 401
- end: 408
loc: {...}
start: {...}
- line: 16
- column: 5
}end: {...}
- line: 16
- column: 12
}
}- name: "endDate"
}init: CallExpression {...}
- type: "CallExpression"
- start: 411
- end: 439
loc: {...}
start: {...}
- line: 16
- column: 15
}end: {...}
- line: 16
- column: 43
}
}callee: Identifier {...}
- type: "Identifier"
- start: 411
- end: 419
loc: {...}
start: {...}
- line: 16
- column: 15
}end: {...}
- line: 16
- column: 23
}
}- name: "$derived"
}arguments: [...] (1)
CallExpression {...}
- type: "CallExpression"
- start: 420
- end: 438
loc: {...}
start: {...}
- line: 16
- column: 24
}end: {...}
- line: 16
- column: 42
}
}callee: Identifier {...}
- type: "Identifier"
- start: 420
- end: 433
loc: {...}
start: {...}
- line: 16
- column: 24
}end: {...}
- line: 16
- column: 37
}
}- name: "convertToDate"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 434
- end: 437
loc: {...}
start: {...}
- line: 16
- column: 38
}end: {...}
- line: 16
- column: 41
}
}- name: "end"
}
]- optional: false
}
]- optional: false
}
}
]- kind: "let"
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 443
- end: 715
loc: {...}
start: {...}
- line: 18
- column: 1
}end: {...}
- line: 27
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 452
- end: 462
loc: {...}
start: {...}
- line: 18
- column: 10
}end: {...}
- line: 18
- column: 20
}
}- name: "bookFlight"
}- expression: false
- generator: false
- async: false
- params: []
body: BlockStatement {...}
- type: "BlockStatement"
- start: 465
- end: 715
loc: {...}
start: {...}
- line: 18
- column: 23
}end: {...}
- line: 27
- column: 2
}
}body: [...] (4)
VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 469
- end: 514
loc: {...}
start: {...}
- line: 19
- column: 2
}end: {...}
- line: 19
- column: 47
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 475
- end: 513
loc: {...}
start: {...}
- line: 19
- column: 8
}end: {...}
- line: 19
- column: 46
}
}id: Identifier {...}
- type: "Identifier"
- start: 475
- end: 479
loc: {...}
start: {...}
- line: 19
- column: 8
}end: {...}
- line: 19
- column: 12
}
}- name: "type"
}init: ConditionalExpression {...}
- type: "ConditionalExpression"
- start: 482
- end: 513
loc: {...}
start: {...}
- line: 19
- column: 15
}end: {...}
- line: 19
- column: 46
}
}test: Identifier {...}
- type: "Identifier"
- start: 482
- end: 490
loc: {...}
start: {...}
- line: 19
- column: 15
}end: {...}
- line: 19
- column: 23
}
}- name: "isReturn"
}consequent: Literal {...}
- type: "Literal"
- start: 493
- end: 501
loc: {...}
start: {...}
- line: 19
- column: 26
}end: {...}
- line: 19
- column: 34
}
}- value: "return"
- raw: "'return'"
}alternate: Literal {...}
- type: "Literal"
- start: 504
- end: 513
loc: {...}
start: {...}
- line: 19
- column: 37
}end: {...}
- line: 19
- column: 46
}
}- value: "one-way"
- raw: "'one-way'"
}
}
}
]- kind: "const"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 518
- end: 604
loc: {...}
start: {...}
- line: 21
- column: 2
}end: {...}
- line: 21
- column: 88
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 522
- end: 603
loc: {...}
start: {...}
- line: 21
- column: 6
}end: {...}
- line: 21
- column: 87
}
}id: Identifier {...}
- type: "Identifier"
- start: 522
- end: 529
loc: {...}
start: {...}
- line: 21
- column: 6
}end: {...}
- line: 21
- column: 13
}
}- name: "message"
}init: TemplateLiteral {...}
- type: "TemplateLiteral"
- start: 532
- end: 603
loc: {...}
start: {...}
- line: 21
- column: 16
}end: {...}
- line: 21
- column: 87
}
}expressions: [...] (2)
Identifier {...}
- type: "Identifier"
- start: 553
- end: 557
loc: {...}
start: {...}
- line: 21
- column: 37
}end: {...}
- line: 21
- column: 41
}
}- name: "type"
} CallExpression {...}
- type: "CallExpression"
- start: 577
- end: 601
loc: {...}
start: {...}
- line: 21
- column: 61
}end: {...}
- line: 21
- column: 85
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 577
- end: 599
loc: {...}
start: {...}
- line: 21
- column: 61
}end: {...}
- line: 21
- column: 83
}
}object: Identifier {...}
- type: "Identifier"
- start: 577
- end: 586
loc: {...}
start: {...}
- line: 21
- column: 61
}end: {...}
- line: 21
- column: 70
}
}- name: "startDate"
}property: Identifier {...}
- type: "Identifier"
- start: 587
- end: 599
loc: {...}
start: {...}
- line: 21
- column: 71
}end: {...}
- line: 21
- column: 83
}
}- name: "toDateString"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}
]quasis: [...] (3)
TemplateElement {...}
- type: "TemplateElement"
- start: 533
- end: 551
loc: {...}
start: {...}
- line: 21
- column: 17
}end: {...}
- line: 21
- column: 35
}
}value: {...}
- raw: "You have booked a "
- cooked: "You have booked a "
}- tail: false
} TemplateElement {...}
- type: "TemplateElement"
- start: 558
- end: 575
loc: {...}
start: {...}
- line: 21
- column: 42
}end: {...}
- line: 21
- column: 59
}
}value: {...}
- raw: " flight, leaving "
- cooked: " flight, leaving "
}- tail: false
} TemplateElement {...}
- type: "TemplateElement"
- start: 602
- end: 602
loc: {...}
start: {...}
- line: 21
- column: 86
}end: {...}
- line: 21
- column: 86
}
}value: {...}
- raw: ""
- cooked: ""
}- tail: true
}
]
}
}
]- kind: "let"
} IfStatement {...}
- type: "IfStatement"
- start: 607
- end: 693
loc: {...}
start: {...}
- line: 22
- column: 2
}end: {...}
- line: 24
- column: 3
}
}test: BinaryExpression {...}
- type: "BinaryExpression"
- start: 611
- end: 628
loc: {...}
start: {...}
- line: 22
- column: 6
}end: {...}
- line: 22
- column: 23
}
}left: Identifier {...}
- type: "Identifier"
- start: 611
- end: 615
loc: {...}
start: {...}
- line: 22
- column: 6
}end: {...}
- line: 22
- column: 10
}
}- name: "type"
}- operator: "==="
right: Literal {...}
- type: "Literal"
- start: 620
- end: 628
loc: {...}
start: {...}
- line: 22
- column: 15
}end: {...}
- line: 22
- column: 23
}
}- value: "return"
- raw: "'return'"
}
}consequent: BlockStatement {...}
- type: "BlockStatement"
- start: 630
- end: 693
loc: {...}
start: {...}
- line: 22
- column: 25
}end: {...}
- line: 24
- column: 3
}
}body: [...] (1)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 635
- end: 689
loc: {...}
start: {...}
- line: 23
- column: 3
}end: {...}
- line: 23
- column: 57
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 635
- end: 688
loc: {...}
start: {...}
- line: 23
- column: 3
}end: {...}
- line: 23
- column: 56
}
}- operator: "+="
left: Identifier {...}
- type: "Identifier"
- start: 635
- end: 642
loc: {...}
start: {...}
- line: 23
- column: 3
}end: {...}
- line: 23
- column: 10
}
}- name: "message"
}right: TemplateLiteral {...}
- type: "TemplateLiteral"
- start: 646
- end: 688
loc: {...}
start: {...}
- line: 23
- column: 14
}end: {...}
- line: 23
- column: 56
}
}expressions: [...] (1)
CallExpression {...}
- type: "CallExpression"
- start: 664
- end: 686
loc: {...}
start: {...}
- line: 23
- column: 32
}end: {...}
- line: 23
- column: 54
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 664
- end: 684
loc: {...}
start: {...}
- line: 23
- column: 32
}end: {...}
- line: 23
- column: 52
}
}object: Identifier {...}
- type: "Identifier"
- start: 664
- end: 671
loc: {...}
start: {...}
- line: 23
- column: 32
}end: {...}
- line: 23
- column: 39
}
}- name: "endDate"
}property: Identifier {...}
- type: "Identifier"
- start: 672
- end: 684
loc: {...}
start: {...}
- line: 23
- column: 40
}end: {...}
- line: 23
- column: 52
}
}- name: "toDateString"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}
]quasis: [...] (2)
TemplateElement {...}
- type: "TemplateElement"
- start: 647
- end: 662
loc: {...}
start: {...}
- line: 23
- column: 15
}end: {...}
- line: 23
- column: 30
}
}value: {...}
- raw: " and returning "
- cooked: " and returning "
}- tail: false
} TemplateElement {...}
- type: "TemplateElement"
- start: 687
- end: 687
loc: {...}
start: {...}
- line: 23
- column: 55
}end: {...}
- line: 23
- column: 55
}
}value: {...}
- raw: ""
- cooked: ""
}- tail: true
}
]
}
}
}
]
}- alternate: null
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 697
- end: 712
loc: {...}
start: {...}
- line: 26
- column: 2
}end: {...}
- line: 26
- column: 17
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 697
- end: 711
loc: {...}
start: {...}
- line: 26
- column: 2
}end: {...}
- line: 26
- column: 16
}
}callee: Identifier {...}
- type: "Identifier"
- start: 697
- end: 702
loc: {...}
start: {...}
- line: 26
- column: 2
}end: {...}
- line: 26
- column: 7
}
}- name: "alert"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 703
- end: 710
loc: {...}
start: {...}
- line: 26
- column: 8
}end: {...}
- line: 26
- column: 15
}
}- name: "message"
}
]- optional: false
}
}
]
}
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 718
- end: 838
loc: {...}
start: {...}
- line: 29
- column: 1
}end: {...}
- line: 32
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 727
- end: 740
loc: {...}
start: {...}
- line: 29
- column: 10
}end: {...}
- line: 29
- column: 23
}
}- name: "convertToDate"
}- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 741
- end: 744
loc: {...}
start: {...}
- line: 29
- column: 24
}end: {...}
- line: 29
- column: 27
}
}- name: "str"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 746
- end: 838
loc: {...}
start: {...}
- line: 29
- column: 29
}end: {...}
- line: 32
- column: 2
}
}body: [...] (2)
VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 750
- end: 779
loc: {...}
start: {...}
- line: 30
- column: 2
}end: {...}
- line: 30
- column: 31
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 756
- end: 778
loc: {...}
start: {...}
- line: 30
- column: 8
}end: {...}
- line: 30
- column: 30
}
}id: Identifier {...}
- type: "Identifier"
- start: 756
- end: 761
loc: {...}
start: {...}
- line: 30
- column: 8
}end: {...}
- line: 30
- column: 13
}
}- name: "split"
}init: CallExpression {...}
- type: "CallExpression"
- start: 764
- end: 778
loc: {...}
start: {...}
- line: 30
- column: 16
}end: {...}
- line: 30
- column: 30
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 764
- end: 773
loc: {...}
start: {...}
- line: 30
- column: 16
}end: {...}
- line: 30
- column: 25
}
}object: Identifier {...}
- type: "Identifier"
- start: 764
- end: 767
loc: {...}
start: {...}
- line: 30
- column: 16
}end: {...}
- line: 30
- column: 19
}
}- name: "str"
}property: Identifier {...}
- type: "Identifier"
- start: 768
- end: 773
loc: {...}
start: {...}
- line: 30
- column: 20
}end: {...}
- line: 30
- column: 25
}
}- name: "split"
}- computed: false
- optional: false
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 774
- end: 777
loc: {...}
start: {...}
- line: 30
- column: 26
}end: {...}
- line: 30
- column: 29
}
}- value: "-"
- raw: "'-'"
}
]- optional: false
}
}
]- kind: "const"
} ReturnStatement {...}
- type: "ReturnStatement"
- start: 782
- end: 835
loc: {...}
start: {...}
- line: 31
- column: 2
}end: {...}
- line: 31
- column: 55
}
}argument: NewExpression {...}
- type: "NewExpression"
- start: 789
- end: 834
loc: {...}
start: {...}
- line: 31
- column: 9
}end: {...}
- line: 31
- column: 54
}
}callee: Identifier {...}
- type: "Identifier"
- start: 793
- end: 797
loc: {...}
start: {...}
- line: 31
- column: 13
}end: {...}
- line: 31
- column: 17
}
}- name: "Date"
}arguments: [...] (3)
UnaryExpression {...}
- type: "UnaryExpression"
- start: 798
- end: 807
loc: {...}
start: {...}
- line: 31
- column: 18
}end: {...}
- line: 31
- column: 27
}
}- operator: "+"
- prefix: true
argument: MemberExpression {...}
- type: "MemberExpression"
- start: 799
- end: 807
loc: {...}
start: {...}
- line: 31
- column: 19
}end: {...}
- line: 31
- column: 27
}
}object: Identifier {...}
- type: "Identifier"
- start: 799
- end: 804
loc: {...}
start: {...}
- line: 31
- column: 19
}end: {...}
- line: 31
- column: 24
}
}- name: "split"
}property: Literal {...}
- type: "Literal"
- start: 805
- end: 806
loc: {...}
start: {...}
- line: 31
- column: 25
}end: {...}
- line: 31
- column: 26
}
}- value: 0
- raw: "0"
}- computed: true
- optional: false
}
} BinaryExpression {...}
- type: "BinaryExpression"
- start: 809
- end: 822
loc: {...}
start: {...}
- line: 31
- column: 29
}end: {...}
- line: 31
- column: 42
}
}left: UnaryExpression {...}
- type: "UnaryExpression"
- start: 809
- end: 818
loc: {...}
start: {...}
- line: 31
- column: 29
}end: {...}
- line: 31
- column: 38
}
}- operator: "+"
- prefix: true
argument: MemberExpression {...}
- type: "MemberExpression"
- start: 810
- end: 818
loc: {...}
start: {...}
- line: 31
- column: 30
}end: {...}
- line: 31
- column: 38
}
}object: Identifier {...}
- type: "Identifier"
- start: 810
- end: 815
loc: {...}
start: {...}
- line: 31
- column: 30
}end: {...}
- line: 31
- column: 35
}
}- name: "split"
}property: Literal {...}
- type: "Literal"
- start: 816
- end: 817
loc: {...}
start: {...}
- line: 31
- column: 36
}end: {...}
- line: 31
- column: 37
}
}- value: 1
- raw: "1"
}- computed: true
- optional: false
}
}- operator: "-"
right: Literal {...}
- type: "Literal"
- start: 821
- end: 822
loc: {...}
start: {...}
- line: 31
- column: 41
}end: {...}
- line: 31
- column: 42
}
}- value: 1
- raw: "1"
}
} UnaryExpression {...}
- type: "UnaryExpression"
- start: 824
- end: 833
loc: {...}
start: {...}
- line: 31
- column: 44
}end: {...}
- line: 31
- column: 53
}
}- operator: "+"
- prefix: true
argument: MemberExpression {...}
- type: "MemberExpression"
- start: 825
- end: 833
loc: {...}
start: {...}
- line: 31
- column: 45
}end: {...}
- line: 31
- column: 53
}
}object: Identifier {...}
- type: "Identifier"
- start: 825
- end: 830
loc: {...}
start: {...}
- line: 31
- column: 45
}end: {...}
- line: 31
- column: 50
}
}- name: "split"
}property: Literal {...}
- type: "Literal"
- start: 831
- end: 832
loc: {...}
start: {...}
- line: 31
- column: 51
}end: {...}
- line: 31
- column: 52
}
}- value: 2
- raw: "2"
}- computed: true
- optional: false
}
}
]
}
}
]
}
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 841
- end: 933
loc: {...}
start: {...}
- line: 34
- column: 1
}end: {...}
- line: 38
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 850
- end: 853
loc: {...}
start: {...}
- line: 34
- column: 10
}end: {...}
- line: 34
- column: 13
}
}- name: "pad"
}- expression: false
- generator: false
- async: false
params: [...] (2)
Identifier {...}
- type: "Identifier"
- start: 854
- end: 855
loc: {...}
start: {...}
- line: 34
- column: 14
}end: {...}
- line: 34
- column: 15
}
}- name: "x"
} Identifier {...}
- type: "Identifier"
- start: 857
- end: 860
loc: {...}
start: {...}
- line: 34
- column: 17
}end: {...}
- line: 34
- column: 20
}
}- name: "len"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 862
- end: 933
loc: {...}
start: {...}
- line: 34
- column: 22
}end: {...}
- line: 38
- column: 2
}
}body: [...] (3)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 866
- end: 880
loc: {...}
start: {...}
- line: 35
- column: 2
}end: {...}
- line: 35
- column: 16
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 866
- end: 879
loc: {...}
start: {...}
- line: 35
- column: 2
}end: {...}
- line: 35
- column: 15
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 866
- end: 867
loc: {...}
start: {...}
- line: 35
- column: 2
}end: {...}
- line: 35
- column: 3
}
}- name: "x"
}right: CallExpression {...}
- type: "CallExpression"
- start: 870
- end: 879
loc: {...}
start: {...}
- line: 35
- column: 6
}end: {...}
- line: 35
- column: 15
}
}callee: Identifier {...}
- type: "Identifier"
- start: 870
- end: 876
loc: {...}
start: {...}
- line: 35
- column: 6
}end: {...}
- line: 35
- column: 12
}
}- name: "String"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 877
- end: 878
loc: {...}
start: {...}
- line: 35
- column: 13
}end: {...}
- line: 35
- column: 14
}
}- name: "x"
}
]- optional: false
}
}
} WhileStatement {...}
- type: "WhileStatement"
- start: 883
- end: 918
loc: {...}
start: {...}
- line: 36
- column: 2
}end: {...}
- line: 36
- column: 37
}
}test: BinaryExpression {...}
- type: "BinaryExpression"
- start: 890
- end: 904
loc: {...}
start: {...}
- line: 36
- column: 9
}end: {...}
- line: 36
- column: 23
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 890
- end: 898
loc: {...}
start: {...}
- line: 36
- column: 9
}end: {...}
- line: 36
- column: 17
}
}object: Identifier {...}
- type: "Identifier"
- start: 890
- end: 891
loc: {...}
start: {...}
- line: 36
- column: 9
}end: {...}
- line: 36
- column: 10
}
}- name: "x"
}property: Identifier {...}
- type: "Identifier"
- start: 892
- end: 898
loc: {...}
start: {...}
- line: 36
- column: 11
}end: {...}
- line: 36
- column: 17
}
}- name: "length"
}- computed: false
- optional: false
}- operator: "<"
right: Identifier {...}
- type: "Identifier"
- start: 901
- end: 904
loc: {...}
start: {...}
- line: 36
- column: 20
}end: {...}
- line: 36
- column: 23
}
}- name: "len"
}
}body: ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 906
- end: 918
loc: {...}
start: {...}
- line: 36
- column: 25
}end: {...}
- line: 36
- column: 37
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 906
- end: 917
loc: {...}
start: {...}
- line: 36
- column: 25
}end: {...}
- line: 36
- column: 36
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 906
- end: 907
loc: {...}
start: {...}
- line: 36
- column: 25
}end: {...}
- line: 36
- column: 26
}
}- name: "x"
}right: TemplateLiteral {...}
- type: "TemplateLiteral"
- start: 910
- end: 917
loc: {...}
start: {...}
- line: 36
- column: 29
}end: {...}
- line: 36
- column: 36
}
}expressions: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 914
- end: 915
loc: {...}
start: {...}
- line: 36
- column: 33
}end: {...}
- line: 36
- column: 34
}
}- name: "x"
}
]quasis: [...] (2)
TemplateElement {...}
- type: "TemplateElement"
- start: 911
- end: 912
loc: {...}
start: {...}
- line: 36
- column: 30
}end: {...}
- line: 36
- column: 31
}
}value: {...}
- raw: "0"
- cooked: "0"
}- tail: false
} TemplateElement {...}
- type: "TemplateElement"
- start: 916
- end: 916
loc: {...}
start: {...}
- line: 36
- column: 35
}end: {...}
- line: 36
- column: 35
}
}value: {...}
- raw: ""
- cooked: ""
}- tail: true
}
]
}
}
}
} ReturnStatement {...}
- type: "ReturnStatement"
- start: 921
- end: 930
loc: {...}
start: {...}
- line: 37
- column: 2
}end: {...}
- line: 37
- column: 11
}
}argument: Identifier {...}
- type: "Identifier"
- start: 928
- end: 929
loc: {...}
start: {...}
- line: 37
- column: 9
}end: {...}
- line: 37
- column: 10
}
}- name: "x"
}
}
]
}
}
]- sourceType: "module"
leadingComments: [...] (1)
Line {...}
- type: "Line"
- value: " https://eugenkiss.github.io/7guis/tasks/#flight "
}
]
}- attributes: []
}
}
The AST is not public API and may change at any point in time