In my Vue 3 project (3.5.13), I'm encountering an error that I don't understand.
const day = ref<DayPresenter>(new DayPresenter());
const dayComputed = computed<DayPresenter>(() => day.value);
I have an error “No overload matches this call.” on the computed. I also get a similar error when I pass it to a child component as props.
const props = defineProps({
day: {
type: Object as PropType<DayPresenter>,
required: true,
},
});
Why is there this error and what can I do to correct it?
I know I can cast by doing as DayPresenter
but I'd like to avoid that.