i'm developing a discord.js bot and I have an object (called dtm) that keeps all users' data.
It has this structure:
{
// id of the user : {data}
"92875891383" : {wallet: 100}
}
If in the code I use dtm[interaction.user.id] I don't get intellisense for the user's parameters, I think because intellisense doesn't know what interaction.user.id is. How can I achieve this? I thought with JSDoc, but i don't know quite how to achieve this...
Found it. I used this JSDoc:
/**
*
* @returns {{[key: string] : theSchema}} playerData
*/
And it finally worked! Thank you