问题描述
我想知道如何使用typedef的属性:
给定:
/**
* The Settings to be passed to the Class
* @typedef {Object} Settings
* @property {HTMLElement | SVGElement | Document} [foo=document] foo
*/
/**
* I want to use the property from a typedef here:
* @param {Settings.foo} foo
*/
function bar(items) {}
这将无法正常工作。我也尝试将Settings['foo']
设为defined in ts,但这在“未知字符”上也无效。
如何在不使用打字稿的情况下在JSDocs中进行操作? 谢谢:)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)