下面是eslint的jsdoc插件不喜欢的一个jsdoc:
@property {{event: Object.<string, MyEnum[]>, observation: Object.<string, MyEnum[]>}} enums
它抱怨:Syntax error in type: (...) jsdoc/valid-types
如果我将"Event"重命名为"Events",它将再次工作.
你知道为什么我不能有一个名为"Event"的对象键吗?
SOLVED (by andrew arrow, see his solution below):个
多亏了@Andrew Arrow,我最终像这样分解了我的"enum"密钥,它不再抱怨了:
@property {Object} enums
@property {Object.<string, MyEnum[]>} enums.event
@property {Object.<string, MyEnum[]>} enums.observation
谢谢安德鲁!