Your composable is losing the ref type when you return it in an object. TypeScript is widening the type to a plain object.
Add "as const" to your return statement in the composable:
return { testFoo } as const;
Or explicitly type what the composable returns so TypeScript knows testFoo is a Ref<string> and not just some generic property.