import { expectType } from 'tsd' import { Ref, ref } from './index' import { isRef } from '@vue/reactivity' function foo(arg: number | Ref) { // ref coercing const coerced = ref(arg) expectType>(coerced) // isRef as type guard if (isRef(arg)) { expectType>(arg) } } foo(1)