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.91k stars 1.02k forks source link

error TS2536: Type 'key' cannot be used to index type 'Store<string, S, G, {}> #2603

Closed coader closed 6 months ago

coader commented 6 months ago

Reproduction

error TS2536:

Steps to reproduce the bug

354 [key in Keys]: () => Store<string, S, G, {}>[key];



Found 1 error in ../../node_modules/.pnpm/pinia@2.1.7_typescript@5.4.2_vue@3.4.21/node_modules/pinia/dist/pinia.d.ts:354

### Expected behavior

it's ok yesterday, I  don't know why and which package upgrade bring this

### Actual behavior

- error TS2536: Type 'key' cannot be used to index type 'Store<string, S, G, {}>'.

### Additional information

_No response_