Преглед на файлове

fix: TS error in CfgMgr migration functions

Sven преди 1 година
родител
ревизия
4799a9f3f5
променени са 2 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 5 0
      .changeset/moody-cobras-attend.md
  2. 1 1
      lib/config.ts

+ 5 - 0
.changeset/moody-cobras-attend.md

@@ -0,0 +1,5 @@
+---
+"@sv443-network/userutils": patch
+---
+
+Fix TS error in ConfigManager migration functions

+ 1 - 1
lib/config.ts

@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-explicit-any */
 
 /** Function that takes the data in the old format and returns the data in the new format. Also supports an asynchronous migration. */
-type MigrationFunc = <TOldData = any>(oldData: TOldData) => any | Promise<any>;
+type MigrationFunc = (oldData: any) => any | Promise<any>;
 /** Dictionary of format version numbers and the function that migrates to them from the previous whole integer */
 type MigrationsDict = Record<number, MigrationFunc>;