import { computed, Ref } from 'vue'; export function useSync void>( props: T, key: K, emit: E ): Ref { return computed({ get() { return props[key]; }, set(newVal) { emit(`update:${key}` as const, newVal); }, }); }