diff options
Diffstat (limited to 'lib/connection.ts')
-rw-r--r-- | lib/connection.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/connection.ts b/lib/connection.ts new file mode 100644 index 0000000..17ea59a --- /dev/null +++ b/lib/connection.ts @@ -0,0 +1,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; + |