chore: annotate `each_array` return value (#18325)

tiny self-mergeable change extracted from #18035 — just turns
`each_array` from a `Derived<any[]>` to a `Derived<V[]>`
pull/18329/head
Rich Harris 3 months ago committed by GitHub
parent 70afafe18e
commit e027d8bf22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -203,7 +203,9 @@ export function each(node, flags, get_collection, get_key, render_fn, fallback_f
var each_array = derived_safe_equal(() => {
var collection = get_collection();
return is_array(collection) ? collection : collection == null ? [] : array_from(collection);
return /** @type {V[]} */ (
is_array(collection) ? collection : collection == null ? [] : array_from(collection)
);
});
if (DEV) {

Loading…
Cancel
Save