mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-06 22:35:57 +08:00
mongoose-simple-random: Convert to external module (#20083)
This commit is contained in:
15
types/mongoose-simple-random/index.d.ts
vendored
15
types/mongoose-simple-random/index.d.ts
vendored
@@ -1,17 +1,12 @@
|
||||
// Type definitions for mongoose-simple-random 0.4
|
||||
// Project: https://github.com/larryprice/mongoose-simple-random
|
||||
// Definitions by: My Self <https://github.com/me>
|
||||
// Definitions by: Roberts Slisans <https://github.com/rsxdalv>
|
||||
// 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<T extends Document> extends NodeJS.EventEmitter, ModelProperties {
|
||||
|
||||
Reference in New Issue
Block a user