partizan, I'm trying to use generic type with vue composition API, and getting an error.
import { ref } from "vue"; function useContext<T extends BaseContext>(v: T) { const context = ref<T | null>(null) context.value = v return {context} } interface BaseContext {}
src/main.ts:5:3 - error TS2322: Type 'T' is not assignable to type 'UnwrapRef<T> | null'.
Is this a bug, or am i doing something wrong?