Переглянути джерело

fix: TS error in CfgMgr migration functions

Sven 1 рік тому
батько
коміт
4799a9f
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>;