diff --git a/types/mongoose-simple-random/index.d.ts b/types/mongoose-simple-random/index.d.ts index 679ba1fbee..fb8edd3500 100644 --- a/types/mongoose-simple-random/index.d.ts +++ b/types/mongoose-simple-random/index.d.ts @@ -1,17 +1,12 @@ // Type definitions for mongoose-simple-random 0.4 // Project: https://github.com/larryprice/mongoose-simple-random -// Definitions by: My Self +// Definitions by: Roberts Slisans // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module 'mongoose-simple-random' { - import mongoose = require('mongoose'); - // 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; -} +import mongoose = require('mongoose'); +declare function pluginFunc(schema: mongoose.Schema): void; +declare namespace pluginFunc {} +export = pluginFunc; declare module "mongoose" { interface Model extends NodeJS.EventEmitter, ModelProperties {