From dcda58e335071d4f24e288d737802997c20eb653 Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Thu, 29 Jun 2017 13:10:22 +0300 Subject: [PATCH] Found a way. --- types/mongoose-simple-random/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/mongoose-simple-random/index.d.ts b/types/mongoose-simple-random/index.d.ts index 4625f582d1..16b1c21483 100644 --- a/types/mongoose-simple-random/index.d.ts +++ b/types/mongoose-simple-random/index.d.ts @@ -5,7 +5,11 @@ declare module 'mongoose-simple-random' { import mongoose = require('mongoose'); - function plugin(schema: mongoose.Schema): void; + // Dummy function allows to avoid hard to kill or fix tslint warning + // (exporting pluginFunc will make this a non-importable module) + function pluginFunc(schema: mongoose.Schema): void; + // Let allows typescript to still use ES2015 style imports + let plugin: typeof pluginFunc; export = plugin; }