From f8ebf581f8272615f48ce355c6b2cbf8248c73bd Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 2 Dec 2020 15:26:25 +0300 Subject: feat: export client class --- lib/connection.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/connection.ts (limited to 'lib/connection.ts') 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>; + dropCollection: (name: string) => Promise; +} + + +export default Connection; + -- cgit v1.2.3