db client typing

Good morning. I am using the new connect method, and working on typing. I am new to TS so still working out how to make it work.
interface Client {
config: Config;
interactions: Collection<string, InteractionSpark | CommandSpark>;
gates: Collection<string, Gate>;
logger: Logger;
scheduledEvents: Collection<string, CronJob>;
db: any;
}

client.db = await drizzle('node-postgres', dbURL);
interface Client {
config: Config;
interactions: Collection<string, InteractionSpark | CommandSpark>;
gates: Collection<string, Gate>;
logger: Logger;
scheduledEvents: Collection<string, CronJob>;
db: any;
}

client.db = await drizzle('node-postgres', dbURL);
Clearly, I do not want any here; I just put it there for the moment as I figure out the correct type. I am just not sure what to do. Normally, I use the function returns for clues, but in this case, DetermineClient is not exported, and I doubt it is correct anyway.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server