From 7f20aaa9fa8077491f20e070528605bb37b310dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Berre=C3=9Fem?= Date: Mon, 20 Jan 2020 12:03:27 +0100 Subject: [PATCH] :pencil2: Add typedef --- index.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..0c7646a --- /dev/null +++ b/index.d.ts @@ -0,0 +1,19 @@ +declare module 'cachegoose' { + import { DocumentQuery, Document, Mongoose } from 'mongoose' + + function cachegoose(mongoose: Mongoose, cacheOptions?: cachegoose.Types.IOptions): void + + namespace cachegoose { + namespace Types { + interface IOptions { + engine?: string + port?: number + host?: string + } + } + + function clearCache(customKey: string, cb?: () => void): void + } + + export = cachegoose +}