How to use @sapphire/decorators?
I tried using it but am getting this error:
Unable to resolve signature of class decorator when called as an expression.
The runtime will invoke the decorator with 2 arguments, but the decorator expects 1.
import { ApplyOptions } from '@sapphire/decorators';
import { Command, CommandOptions } from '@sapphire/framework';
import { Message, TextChannel } from 'discord.js';
import { addHelpRequestToDatabase } from '../database_handler';
import { mainChatId, logChannelId } from '../config';
@ApplyOptions
<Command.Options>({
description: 'ping pong',
enabled: true
})
Solution:Jump to solution
add
experimentalDecorators
to your tsconfig or extend @sapphire/ts-config/decorators
1 Reply
Solution
add
experimentalDecorators
to your tsconfig or extend @sapphire/ts-config/decorators