瀏覽代碼

fix: change jsdoc description

Sv443 1 年之前
父節點
當前提交
5b18b56e12
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lib/ConfigManager.ts

+ 4 - 2
lib/ConfigManager.ts

@@ -35,16 +35,18 @@ export type ConfigManagerOptions<TData> = {
 & ({
   /**
    * Function to use to encode the data prior to saving it in persistent storage.  
-   * The input data is a serialized JSON object.  
+   * If this is specified, make sure to declare {@linkcode decodeData()} as well.  
    *   
    * You can make use of UserUtils' [`compress()`](https://github.com/Sv443-Network/UserUtils?tab=readme-ov-file#compress) function here to make the data use up less space at the cost of a little bit of performance.
+   * @param data The input data as a serialized object (JSON string)
    */
   encodeData: (data: string) => string | Promise<string>,
   /**
    * Function to use to decode the data after reading it from persistent storage.  
-   * The result should be a valid JSON object.  
+   * If this is specified, make sure to declare {@linkcode encodeData()} as well.  
    *   
    * You can make use of UserUtils' [`decompress()`](https://github.com/Sv443-Network/UserUtils?tab=readme-ov-file#decompress) function here to make the data use up less space at the cost of a little bit of performance.
+   * @returns The resulting data as a valid serialized object (JSON string)
    */
   decodeData: (data: string) => string | Promise<string>,
 } | {