我正在尝试在 typegoose 模型上定义一个虚拟属性。
class foo {
...
start: Date
end: Date
get duration(){
return this.end - this.start
}
}
我收到this
没有属性end
或start
. 有没有办法让它正常工作?
谢谢
我正在尝试在 typegoose 模型上定义一个虚拟属性。
class foo {
...
start: Date
end: Date
get duration(){
return this.end - this.start
}
}
我收到this
没有属性end
或start
. 有没有办法让它正常工作?
谢谢