我可以在 javascript 中链接静态方法吗?这是我正在尝试做的一个例子
test.js
'use strict'
class testModel{
static a(){
return "something that will be used in next method"
}
static b(){
let previousMethodData = "previous method data"
return "data that has been modified by b() method"
}
}
module.exports = testModel
然后我希望能够像这样调用方法
const value = testModel.a().b()
慕码人8056858
相关分类