Found a way.

This commit is contained in:
Roberts Slisans
2017-06-29 13:10:22 +03:00
parent ee28ce2e13
commit dcda58e335
+5 -1
View File
@@ -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;
}