@@ -26,7 +26,6 @@ import {
2626 EACH_IS_CONTROLLED ,
2727 EACH_INDEX_REACTIVE ,
2828 EACH_ITEM_REACTIVE ,
29- EACH_IS_ANIMATED ,
3029 PassiveDelegatedEvents ,
3130 DelegatedEvents
3231} from '../../constants.js' ;
@@ -624,7 +623,7 @@ export function bind_playback_rate(media, get_value, update) {
624623 // Needs to happen after the element is inserted into the dom, else playback will be set back to 1 by the browser.
625624 // For hydration we could do it immediately but the additional code is not worth the lost microtask.
626625
627- /** @type {import('./types.js').Signal | undefined } */
626+ /** @type {import('./types.js').ComputationSignal | undefined } */
628627 let render ;
629628 let destroyed = false ;
630629 const effect = managed_effect ( ( ) => {
@@ -2083,7 +2082,7 @@ export function update_each_item_block(block, item, index, type) {
20832082 if ( transitions !== null && ( type & EACH_KEYED ) !== 0 ) {
20842083 let prev_index = block . index ;
20852084 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 ;
20872086 }
20882087 const items = block . parent . items ;
20892088 if ( prev_index !== index && /** @type {number } */ ( index ) < items . length ) {
@@ -2125,7 +2124,7 @@ export function destroy_each_item_block(
21252124 if ( ! controlled && dom !== null ) {
21262125 remove ( dom ) ;
21272126 }
2128- destroy_signal ( /** @type {import('./types.js').Signal } */ ( block . effect ) ) ;
2127+ destroy_signal ( /** @type {import('./types.js').EffectSignal } */ ( block . effect ) ) ;
21292128 }
21302129}
21312130
@@ -2244,11 +2243,7 @@ function each(anchor_node, collection, flags, key_fn, render_fn, fallback_fn, re
22442243 ? [ ]
22452244 : Array . from ( maybe_array ) ;
22462245 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 ) ;
22522247 }
22532248 if ( fallback_fn !== null ) {
22542249 if ( array . length === 0 ) {
@@ -3163,7 +3158,7 @@ export function mount(component, options) {
31633158 if ( hydration_fragment !== null ) {
31643159 remove ( hydration_fragment ) ;
31653160 }
3166- destroy_signal ( /** @type {import('./types.js').Signal } */ ( block . effect ) ) ;
3161+ destroy_signal ( /** @type {import('./types.js').EffectSignal } */ ( block . effect ) ) ;
31673162 }
31683163 ] ;
31693164}
0 commit comments