I try to add a static method to my Model, but if I do it, I got this Error: An interface may only extend a class or another interface.
This is my code:
import * as mongoose from 'mongoose';
import {IPermission} from './IPermission';
export interface IRoleDocument extends mongoose.Document {
name: string,
inherit_from: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Role'
},
permissions: Array<IPermission>
};
export interface IRole extends mongoose.Model<IRoleDocument> {
};
Error comes from export interface IRole extends mongoose.Model<IRoleDocument>
Greetz