79784196

Date: 2025-10-07 03:45:44
Score: 1.5
Natty:
Report link

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.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: RONALDO ALBERTO MONZON DE LEON