javascript - Documentarea unei funcții anonime în JSdoc
Încerc să fac JSDoc să funcționeze astfel:
export const beginRefreshGames = () => {
/**
* @param {Snowflake} snowflake
* @param {function} dispatch
* @param {function} getState
*/
return async (dispatch, getState, snowflake) => {
const games = await snowflake.games.getGames()
dispatch(refreshGames(games))
}
}
Vreau să returnez funcția asincronă fără a o lega de o variabilă. Dacă o aloc direct, atunci JSDoc funcționează bine, dar sper că este posibil fără asta.