请考虑以下文件:
const myValue = 32;
module.exports = myValue;
const myFunction = (name) => `Hello ${name}`;
module.exports = myFunction;
class MyClass {
sayMyName(name) {
return `Hello ${name}`;
}
}
module.exports = MyClass;
还有更多,我使用InversifyJS,awilix或等之类的IOC
东西来获取此模块。
// in another file as awilix example:
const myClassInstance = container.resolve('MyClass');
这个jsdoc
与我上面定义的一样吗?
是否有对特殊值/函数/方法的引用?