discord.js breaks other packages event emitter's (typescript)
I may completely be being stupid, but I think djs breaks other packages event emitter's. mongoose for me at least. This piece of code works with ts, but the second you add
import { } from 'discord.js'
import { } from 'discord.js'
it breaks with
Property 'on' does not exist on type 'Connection'. Did you mean to access the static member 'Connection.on' instead?ts(2576)
Property 'on' does not exist on type 'Connection'. Did you mean to access the static member 'Connection.on' instead?ts(2576)
import mongoose from 'mongoose';await mongoose.connect("");mongoose.connection.on("connection", function () {})
import mongoose from 'mongoose';await mongoose.connect("");mongoose.connection.on("connection", function () {})
Even just doing
import { EventEmitter} from 'node:events';const emitter = new EventEmitter();emitter.on("", function () {});
import { EventEmitter} from 'node:events';const emitter = new EventEmitter();emitter.on("", function () {});