[Typescript] Type declaration for dynamic stores #1594
Answered
by
Opekunov
Opekunov
asked this question in
Help and Questions
-
Can you help me, how can I declare tableStores, to display the typescript correctly const storeDefinition = (key: string) => defineStore(key, /*.. options ... */)
const tableStores = {}
export function useIndexTable(key: string) {
key = `table-${key}`
if (!tableStores[key]) tableStores[key] = storeDefinition(key)
return tableStores[key]()
} |
Beta Was this translation helpful? Give feedback.
Answered by
Opekunov
Aug 28, 2022
Replies: 1 comment
-
Thats help me. Thx |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Opekunov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thats help me. Thx
#1509 (comment)