Skip to content
Snippets Groups Projects
util.ts 190 B
Newer Older
import { computed, ComputedGetter, ComputedRef } from 'vue'

export function computedIter<T>(fn: ComputedGetter<Iterable<T>>): ComputedRef<T[]> {
  return computed(() => Array.from(fn()))
}