Verified Commit d2e97741 authored by Florent Chehab's avatar Florent Chehab
Browse files

docs(global hooks helper): impove js doc

parent 5c0d6ab7
......@@ -30,8 +30,8 @@ const globalStateListeners = new Map();
/**
* Helper to update all the listeners on the global state key
*
* @param key
* @param newValue
* @param {string} key
* @param {any} newValue
* @private
*/
function updateGlobalStateListeners(key, newValue) {
......@@ -45,8 +45,8 @@ function updateGlobalStateListeners(key, newValue) {
/**
* Helper to update the values in the global state and tel the associated listeners
*
* @param key
* @param newValue
* @param {string} key
* @param {any} newValue
*/
export function updateGlobalState(key, newValue) {
const valueInStore = getPersistedValue(key);
......@@ -60,9 +60,9 @@ export function updateGlobalState(key, newValue) {
* Helper to reduce the value in the globalState (identified by a key)
* And trigger an update to all subscribers.
*
* @param key
* @param reducer
* @param action
* @param {string} key
* @param {function(any, object): any} reducer
* @param {{type: string, ...}} action
*/
export function reduceGlobalState(key, reducer, action) {
if (process.env.NODE_ENV !== "production") {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment