【问题标题】:What is the proper JSDOC syntax for referencing imported es6 classes?引用导入的 es6 类的正确 JSDOC 语法是什么?
【发布时间】:2016-02-28 04:30:30
【问题描述】:

我正在尝试找出在 JSDOC 中将外部类指定为参数/返回的正确语法。

所以,例如,我有:

import redux from 'redux';

/**
 * @param {object} state
 * @return {{module:redux.Store}}
 */
export function initState(state=initialState) {
  store = redux.createStore(theReducer, Immutable.fromJS(state));
  return store;
}

问题是,如果我在 webstorm 中使用它,Store 上的“转到声明”会将我发送到完全不相关的地方。

这意味着,要么我的语法错误(什么是正确的?),要么是 Webstorm 中的错误

【问题讨论】:

    标签: javascript ecmascript-6 webstorm jsdoc commonjs


    【解决方案1】:

    语法看起来不错...记录为WEB-19261,请关注它以获取更新

    【讨论】:

      猜你喜欢
      • 2016-12-07
      • 2019-02-02
      • 2013-12-13
      • 2014-08-04
      • 2017-10-11
      • 2016-10-27
      • 2019-09-04
      • 2016-01-11
      • 2019-09-14
      相关资源
      最近更新 更多