📜  扩展猫鼬文档对象的接口不包含_doc对象打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:27.236000             🧑  作者: Mango

代码示例1
// create a generic interface
import { Document } from 'mongoose';

export interface DocumentResult extends Document {
    _doc: T;
}

interface IUser extends DocumentResult {
    id: string;
    firstname: string;
    lastname: string;
    phoneNumber: IPhoneNumber;
    email: string;
    password: string;
}