esLint
This commit is contained in:
@@ -32,13 +32,13 @@ export interface HandleSaveParams {
|
||||
speicherintervall: number[];
|
||||
};
|
||||
slot: number;
|
||||
dispatch: any;
|
||||
dispatch: import("redux").Dispatch;
|
||||
onModulNameChange: (id: string) => void;
|
||||
onClose: () => void;
|
||||
onFormUpdate?: (updated: any) => void; // Added this property
|
||||
onFormUpdate?: (updated: Record<string, unknown>) => void; // Specify a more precise type instead of 'any'
|
||||
}
|
||||
|
||||
const isDifferent = (a: any, b: any): boolean => {
|
||||
const isDifferent = (a: unknown, b: unknown): boolean => {
|
||||
const aNum = Number(a);
|
||||
const bNum = Number(b);
|
||||
if (!isNaN(aNum) && !isNaN(bNum)) {
|
||||
@@ -62,7 +62,7 @@ const handleSave = async ({
|
||||
onModulNameChange,
|
||||
onClose,
|
||||
}: HandleSaveParams): Promise<void> => {
|
||||
const changesForFile: Record<string, any> = {};
|
||||
const changesForFile: Record<string, string | number> = {};
|
||||
|
||||
if (isDifferent(ids[slot], originalValues.kueID[slot])) {
|
||||
changesForFile.KID = ids[slot];
|
||||
|
||||
Reference in New Issue
Block a user