Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the proper JSDOC syntax for referencing imported es6 classes?

I'm trying to figure out proper syntax for specifying external classes as params/returns in JSDOC.

so, for example, I have:

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;
}

the problem is, that if I use this in webstorm, "Go To Declaration" on Store sends me to totally irrelevant place.

which means, that either my syntax is wrong (what is the right one?) or it is a bug in Webstorm

like image 709
JimiDini Avatar asked Nov 25 '15 11:11

JimiDini


1 Answers

syntax looks ok... Logged as WEB-19261, please follow it for updates

like image 182
lena Avatar answered Sep 23 '22 14:09

lena