]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/app.service.ts
Update client modules
[github/Chocobozzz/PeerTube.git] / client / src / app / app.service.ts
index 9b582e472a07d1fdf69f1c61558b5666cc1a4471..a7eb880a498f4cd94a366f15e7533022eb8387ee 100644 (file)
@@ -9,28 +9,38 @@ export class AppState {
 
   public _state: InternalStateType = { };
 
-  // already return a clone of the current state
+  /**
+   * Already return a clone of the current state.
+   */
   public get state() {
     return this._state = this._clone(this._state);
   }
-  // never allow mutation
+  /**
+   * Never allow mutation
+   */
   public set state(value) {
     throw new Error('do not mutate the `.state` directly');
   }
 
   public get(prop?: any) {
-    // use our state getter for the clone
+    /**
+     * Use our state getter for the clone.
+     */
     const state = this.state;
     return state.hasOwnProperty(prop) ? state[prop] : state;
   }
 
   public set(prop: string, value: any) {
-    // internally mutate our state
+    /**
+     * Internally mutate our state.
+     */
     return this._state[prop] = value;
   }
 
   private _clone(object: InternalStateType) {
-    // simple object clone
+    /**
+     * Simple object clone.
+     */
     return JSON.parse(JSON.stringify( object ));
   }
 }