1 2 3 4 5 6 7 8 9 10 11 12
import { model, Model } from 'mongoose'; // An interface for mongoose.connection export interface Connection { model: typeof model; models: Record<string, Model<any, any>>; dropCollection: (name: string) => Promise<void>; } export default Connection;