Object literal may only specify known properties, and 'tasks' does not exist in type 'ClientOptions'
Hello there,
I created a new project with
sapphire new
, using the minimal template.
I'm trying to add the @sapphire/plugin-scheduled-tasks
plugin.
Following the doc, I use the npm install command and I added the register in the setup.ts
.
But when I try to add the tasks
options in the SapphireClient (index.ts
), I get the following error ;
Solution:Jump to solution
Interesting I think this happens because tsup outputs the file as
.d.ts
for CJS instead of .d.cts
because it works just fine when using ESM
For now if you add a line import '@sapphire/plugin-scheduled-tasks';
then it's fixed @Pandraghon
pinging @vladdy here as well for reference...5 Replies
Solution
Interesting I think this happens because tsup outputs the file as
.d.ts
for CJS instead of .d.cts
because it works just fine when using ESM
For now if you add a line import '@sapphire/plugin-scheduled-tasks';
then it's fixed @Pandraghon
pinging @vladdy here as well for referenceoof
yeah
Seeing as we already use rollup-type-bundler in the package though I can fix it there. I can make it so it's configurable what the output file extension should be.
Nice, it works! Thanks for this solution!
PR created to fix it for real @Pandraghon (see #plugins-development for link )