Afshin Darian 8 년 전
부모
커밋
b30656ea1f
1개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 14 0
      src/statedb/index.ts

+ 14 - 0
src/statedb/index.ts

@@ -54,6 +54,12 @@ interface IStateDB {
   /**
    * Retrieve a saved bundle from the database.
    *
+   * @param id - The identifier used to save retrieve a data bundle.
+   *
+   * @param namespace - An optional namespace to help categories saved bundles.
+   *
+   * @returns A promise that bears a the saved bundle.
+   *
    * #### Notes
    * If a namespace is not provided, the default value will be `'statedb'`.
    */
@@ -61,11 +67,19 @@ interface IStateDB {
 
   /**
    * Retrieve all the saved bundles for a namespace.
+   *
+   * @param namespace - The namespace to retrieve.
+   *
+   * @returns A promise that bears a collection of saved bundles.
    */
   fetchNamespace(namespace: string): Promise<ISaveBundle[]>;
 
   /**
    * Save a bundle in the database.
+   *
+   * @param bundle - The bundle being saved.
+   *
+   * @returns A promise that is rejected if saving fails and succeeds otherwise.
    */
   save(bundle: ISaveBundle): Promise<void>;
 }