@@ -2777,8 +2777,8 @@ export const template_visitors = {
2777
2777
}
2778
2778
} ,
2779
2779
LetDirective ( node , { state } ) {
2780
- // let:x --> const x = $.derived(() => $.unwrap($$ slotProps) .x);
2781
- // let:x={{y, z}} --> const derived_x = $.derived(() => { const { y, z } = $.unwrap($$ slotProps) .x; return { y, z }));
2780
+ // let:x --> const x = $.derived(() => $$ slotProps.x);
2781
+ // let:x={{y, z}} --> const derived_x = $.derived(() => { const { y, z } = $$ slotProps.x; return { y, z }));
2782
2782
if ( node . expression && node . expression . type !== 'Identifier' ) {
2783
2783
const name = state . scope . generate ( node . name ) ;
2784
2784
const bindings = state . scope . get_bindings ( node ) ;
@@ -2800,7 +2800,7 @@ export const template_visitors = {
2800
2800
b . object_pattern ( node . expression . properties )
2801
2801
: // @ts -expect-error types don't match, but it can't contain spread elements and the structure is otherwise fine
2802
2802
b . array_pattern ( node . expression . elements ) ,
2803
- b . member ( b . call ( '$.unwrap' , b . id ( '$$slotProps' ) ) , b . id ( node . name ) )
2803
+ b . member ( b . id ( '$$slotProps' ) , b . id ( node . name ) )
2804
2804
) ,
2805
2805
b . return ( b . object ( bindings . map ( ( binding ) => b . init ( binding . node . name , binding . node ) ) ) )
2806
2806
] )
@@ -2811,10 +2811,7 @@ export const template_visitors = {
2811
2811
const name = node . expression === null ? node . name : node . expression . name ;
2812
2812
return b . const (
2813
2813
name ,
2814
- b . call (
2815
- '$.derived' ,
2816
- b . thunk ( b . member ( b . call ( '$.unwrap' , b . id ( '$$slotProps' ) ) , b . id ( node . name ) ) )
2817
- )
2814
+ b . call ( '$.derived' , b . thunk ( b . member ( b . id ( '$$slotProps' ) , b . id ( node . name ) ) ) )
2818
2815
) ;
2819
2816
}
2820
2817
} ,
0 commit comments