type definition for tables in customer function

I am Making helper function which need two args like
function helper(db , tables){
const helperFunction = () => ...
const helperFunction2 = () => ...
retrun {
helperFunction,
helperFunction2
}
}

function helper(db, tables1, table2) {
...
}
function helper(db , tables){
const helperFunction = () => ...
const helperFunction2 = () => ...
retrun {
helperFunction,
helperFunction2
}
}

function helper(db, tables1, table2) {
...
}
how to do typeScript for it
3 Replies
Angelelz
Angelelz2mo ago
Your snippet of code is very broad and doesn’t convey the intention and usage of such helper, it’s very hard to help you with little information
ly
ly2mo ago
i mean regardless he wants to know how to functionally use the tables
Angelelz
Angelelz2mo ago
Seems to me that he can use this at runtime, but the problem is the types. But I’m not totally sure what’s the intention. He might need a generic for the type, but how could I know?
Want results from more Discord servers?
Add your server