我已经像这样定义了我的猫鼬模式
export const DIDSchema: mongoose.Schema = new Schema({
socialMediaHandles: {
type: Map,
of: String
}
});
但是当我尝试编译代码时,出现类似
TypeError : Undefined type Map
at socialMediaHandles
Did you try nesting Schemas?您只能使用 refs 或数组进行嵌套。