在维护其文档时正确创建对象/类的字典
如果我有一个具有文档的类listView
,则将其放在字典中:
/** Handles list models */
class listView{}
const views = { list: listView }
属性/键list
没有任何文档或IntelliSense。有没有办法让它显示parentView
的文档而不复制它?
编辑:可以使用的一种方法是定义对象中的类:
const views = {
/** Handles list models */
list: class{ }
}
但是,如果存在更好的解决方案,请告诉我。
If I have a class listView
that has documentation and I put it in a dictionary:
/** Handles list models */
class listView{}
const views = { list: listView }
Then the property/key list
doesn't have any documentation or intellisense. Is there a way for me to have it show parentView
's documentation without copying it?
Edit: One way that can work is to define the class within the object:
const views = {
/** Handles list models */
list: class{ }
}
But if a better solution exists, please let me know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论