@@ -26,7 +26,6 @@ import {
26
26
EACH_IS_CONTROLLED ,
27
27
EACH_INDEX_REACTIVE ,
28
28
EACH_ITEM_REACTIVE ,
29
- EACH_IS_ANIMATED ,
30
29
PassiveDelegatedEvents ,
31
30
DelegatedEvents
32
31
} from '../../constants.js' ;
@@ -624,7 +623,7 @@ export function bind_playback_rate(media, get_value, update) {
624
623
// Needs to happen after the element is inserted into the dom, else playback will be set back to 1 by the browser.
625
624
// For hydration we could do it immediately but the additional code is not worth the lost microtask.
626
625
627
- /** @type {import('./types.js').Signal | undefined } */
626
+ /** @type {import('./types.js').ComputationSignal | undefined } */
628
627
let render ;
629
628
let destroyed = false ;
630
629
const effect = managed_effect ( ( ) => {
@@ -2083,7 +2082,7 @@ export function update_each_item_block(block, item, index, type) {
2083
2082
if ( transitions !== null && ( type & EACH_KEYED ) !== 0 ) {
2084
2083
let prev_index = block . index ;
2085
2084
if ( index_is_reactive ) {
2086
- prev_index = /** @type {import('./types.js').Signal<number> } */ ( prev_index ) . value ;
2085
+ prev_index = /** @type {import('./types.js').Signal<number> } */ ( prev_index ) . v ;
2087
2086
}
2088
2087
const items = block . parent . items ;
2089
2088
if ( prev_index !== index && /** @type {number } */ ( index ) < items . length ) {
@@ -2125,7 +2124,7 @@ export function destroy_each_item_block(
2125
2124
if ( ! controlled && dom !== null ) {
2126
2125
remove ( dom ) ;
2127
2126
}
2128
- destroy_signal ( /** @type {import('./types.js').Signal } */ ( block . effect ) ) ;
2127
+ destroy_signal ( /** @type {import('./types.js').EffectSignal } */ ( block . effect ) ) ;
2129
2128
}
2130
2129
}
2131
2130
@@ -2244,11 +2243,7 @@ function each(anchor_node, collection, flags, key_fn, render_fn, fallback_fn, re
2244
2243
? [ ]
2245
2244
: Array . from ( maybe_array ) ;
2246
2245
if ( key_fn !== null ) {
2247
- const length = array . length ;
2248
- keys = Array ( length ) ;
2249
- for ( let i = 0 ; i < length ; i ++ ) {
2250
- keys [ i ] = key_fn ( array [ i ] ) ;
2251
- }
2246
+ keys = array . map ( key_fn ) ;
2252
2247
}
2253
2248
if ( fallback_fn !== null ) {
2254
2249
if ( array . length === 0 ) {
@@ -3163,7 +3158,7 @@ export function mount(component, options) {
3163
3158
if ( hydration_fragment !== null ) {
3164
3159
remove ( hydration_fragment ) ;
3165
3160
}
3166
- destroy_signal ( /** @type {import('./types.js').Signal } */ ( block . effect ) ) ;
3161
+ destroy_signal ( /** @type {import('./types.js').EffectSignal } */ ( block . effect ) ) ;
3167
3162
}
3168
3163
] ;
3169
3164
}
0 commit comments