vuejs / pinia

🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support
https://pinia.vuejs.org
MIT License
12.72k stars 996 forks source link

Composing Store lose typescript type #2664

Closed defghy closed 2 months ago

defghy commented 2 months ago

Reproduction

placeholder

Steps to reproduce the bug

In defineStore composing function, type is right image

The ReturnValue of defineStore(), type transfer to specific object, which is not right image

I cannot use the object as BoardData image

Expected behavior

BoardData type not change.

Actual behavior

why BoardData transfer to specific { boardId: ''...} ?

Additional information

No response

posva commented 2 months ago

Open a question with the code in discussions or on Discord if you want help