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 +}