@@ -8,37 +8,38 @@ declare class Store {
88 _connection : typeof postRobot ;
99 constructor ( connection : typeof postRobot ) ;
1010 /**
11- * Gets the value of key
12- * @param {string } key Key of the stored data
13- * @example extension.store.get('key').then((value) => console.log(value)) // will log value for the given key
14- * @return {external:Promise }
11+ * Retrieves the stored data value associated with the given key.
12+ * @param {string } key - The key of the stored data.
13+ * @example
14+ * extension.store.get('key').then((value) => console.log(value)); // Logs the value for the given key
15+ * @returns {Promise<any> } A Promise that resolves to the value associated with the key.
1516 */
16- get ( key : string ) : Promise < GenericObjectType > ;
17+ get ( key : string ) : Promise < any > ;
1718 /**
18- * Gets an object with all the stored key-value pairs.
19- * @example extension.store.getAll().then((obj) => obj)
20- * @return {external: Promise}
19+ * Retrieves an object with all the stored key-value pairs.
20+ * @example await extension.store.getAll(); // Returns a Promise containing the stored data.
21+ * @return {Promise<GenericObjectType> } A Promise that resolves with the stored key-value pairs as an object.
2122 */
22- getAll ( ) : Promise < object > ;
23+ getAll ( ) : Promise < GenericObjectType > ;
2324 /**
24- * Sets the value of a key
25- * @param {string } key Key of the stored data.
26- * @param {* } value Data to be stored.
27- * @example extension.store.set('key', 'value').then((success) => console.log(success)) // will log ‘true’ when value is set
28- * @return {external: Promise}
25+ * Sets the value of a key.
26+ * @param {string } key The key for the stored data.
27+ * @param {* } value The data to be stored.
28+ * @example await extension.store.set('key', 'value'); // Returns a Promise that resolves with the success status.
29+ * @return {Promise<boolean> } A Promise that resolves with the success status (true when the value was set successfully).
2930 */
30- set ( key : string , value : string ) : Promise < boolean > ;
31+ set ( key : string , value : any ) : Promise < boolean > ;
3132 /**
32- * Removes the value of a key
33- * @param {string } key Key of the data to be removed from the store
34- * @example extension.store.remove('key').then((success) => console.log(success)) // will log ‘true’ when value is removed
35- * @return {external: Promise}
33+ * Removes the value associated with a key from the store.
34+ * @param {string } key The key whose value needs to be removed.
35+ * @example await extension.store.remove('key'); // Returns a Promise that resolves with the success status.
36+ * @return {Promise<boolean> } A Promise that resolves with the success status (true when the value was removed successfully).
3637 */
3738 remove ( key : string ) : Promise < boolean > ;
3839 /**
39- * Clears all the stored data of an extension
40- * @example extension.store.clear().then((success) => console.log(success)) // will log ‘true’ when values are cleared
41- * @return { external: Promise}
40+ * Clears all the stored data of an extension.
41+ * @example await extension.store.clear(); // Returns a Promise that resolves with the success status.
42+ * @returns { Promise<boolean> } A Promise that resolves with the success status (true when all values are cleared successfully).
4243 */
4344 clear ( ) : Promise < boolean > ;
4445}
0 commit comments