You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Set the target challenge as passed in the state.
74
+
*
63
75
* @param {'basic' | 'intermediate' | 'advanced' | 'extreme'} level - the level of the challenge.
64
76
* @param {string} challengeName - the name of the challenge.
65
77
* @returns void
@@ -81,10 +93,14 @@ class PassedState {
81
93
}
82
94
83
95
/**
84
-
* Merge the new state to the current state. this function will compare the new state with the current state and finally overwrite the current state based on the new state:
85
-
* - If the old key in the current state is not in the new state, the old key will be removed from the current state.
86
-
* - If the new key in the new state is not in the current state, the new key will be added to the current state.
87
-
* @param {object} newState
96
+
* Merge the new state and the current state.
97
+
* this function will compare the new state with the current state and finally overwrite the current state based on the new state:
98
+
* - If the old key in the current state isn't in the new state, the old key will be removed from the current state.
99
+
* - If the new key in the new state isn't in the current state, the new key will be added to the current state.
100
+
*
101
+
* @param {object} oldState - the current state stored in the local storage.
102
+
* @param {object} newState - the latest state from the server.
0 commit comments