@@ -390,7 +390,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
390
390
391
391
if ( node . expression ) {
392
392
for ( const id of extract_identifiers_from_destructuring ( node . expression ) ) {
393
- const binding = scope . declare ( id , 'derived ' , 'const' ) ;
393
+ const binding = scope . declare ( id , 'template ' , 'const' ) ;
394
394
bindings . push ( binding ) ;
395
395
}
396
396
} else {
@@ -401,7 +401,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
401
401
start : node . start ,
402
402
end : node . end
403
403
} ;
404
- const binding = scope . declare ( id , 'derived ' , 'const' ) ;
404
+ const binding = scope . declare ( id , 'template ' , 'const' ) ;
405
405
bindings . push ( binding ) ;
406
406
}
407
407
} ,
@@ -492,7 +492,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
492
492
for ( const id of extract_identifiers ( declarator . id ) ) {
493
493
const binding = state . scope . declare (
494
494
id ,
495
- is_parent_const_tag ? 'derived ' : 'normal' ,
495
+ is_parent_const_tag ? 'template ' : 'normal' ,
496
496
node . kind ,
497
497
declarator . init
498
498
) ;
@@ -548,7 +548,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
548
548
binding . metadata = { inside_rest : is_rest_id } ;
549
549
}
550
550
if ( node . context . type !== 'Identifier' ) {
551
- scope . declare ( b . id ( '$$item' ) , 'derived ' , 'synthetic' ) ;
551
+ scope . declare ( b . id ( '$$item' ) , 'template ' , 'synthetic' ) ;
552
552
}
553
553
// Visit to pick up references from default initializers
554
554
visit ( node . context , { scope } ) ;
@@ -557,7 +557,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
557
557
const is_keyed =
558
558
node . key &&
559
559
( node . key . type !== 'Identifier' || ! node . index || node . key . name !== node . index ) ;
560
- scope . declare ( b . id ( node . index ) , is_keyed ? 'derived ' : 'normal' , 'const' , node ) ;
560
+ scope . declare ( b . id ( node . index ) , is_keyed ? 'template ' : 'normal' , 'const' , node ) ;
561
561
}
562
562
if ( node . key ) visit ( node . key , { scope } ) ;
563
563
@@ -604,7 +604,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
604
604
scopes . set ( node . value , value_scope ) ;
605
605
context . visit ( node . value , { scope : value_scope } ) ;
606
606
for ( const id of extract_identifiers ( node . value ) ) {
607
- then_scope . declare ( id , 'derived ' , 'const' ) ;
607
+ then_scope . declare ( id , 'template ' , 'const' ) ;
608
608
value_scope . declare ( id , 'normal' , 'const' ) ;
609
609
}
610
610
}
@@ -618,7 +618,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
618
618
scopes . set ( node . error , error_scope ) ;
619
619
context . visit ( node . error , { scope : error_scope } ) ;
620
620
for ( const id of extract_identifiers ( node . error ) ) {
621
- catch_scope . declare ( id , 'derived ' , 'const' ) ;
621
+ catch_scope . declare ( id , 'template ' , 'const' ) ;
622
622
error_scope . declare ( id , 'normal' , 'const' ) ;
623
623
}
624
624
}
0 commit comments