sound icon indicating copy to clipboard operation
sound copied to clipboard

Type errors when using Ref<number> for volume

Open chuckntaylor opened this issue 2 years ago • 0 comments

I'm likely doing something wrong, or it is an unrelated IDE issue. I am getting an error: Type Ref<number> is not assignable to type '(MaybeRef<number> & number) | undefined when I do the following:

const systemSoundVolume = ref(0.5)
const notification = useSound('url-to-asset', {
volume: systemSoundVolume // error here
})

Any ideas?

For additional context, I manage all the app audio in an audioStore using pinia. So, this is not in the setup function of a component.

chuckntaylor avatar May 09 '23 04:05 chuckntaylor