From 1abe8a10c80296963573ed1f901d0260f0ee0117 Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Mon, 12 Jun 2023 12:51:04 +0200 Subject: [PATCH] fix: `unknown` al posto di `any` --- resources/ts/Components/Pages/RecordsPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/ts/Components/Pages/RecordsPage.tsx b/resources/ts/Components/Pages/RecordsPage.tsx index 594386636..05b7cdf62 100644 --- a/resources/ts/Components/Pages/RecordsPage.tsx +++ b/resources/ts/Components/Pages/RecordsPage.tsx @@ -165,7 +165,7 @@ export default abstract class RecordsPage< onDeleteRecordButtonClick={this.onDeleteRecordButtonClicked.bind(this)} onDeleteSelectedRecordsButtonClick={this.onDeleteSelectedRecordsButtonClicked.bind(this)} readonly={this.readonlyRecords} - valueModifier={(value, attribute: string, record: M) => this.cellValueModifier(value, attribute, record) + valueModifier={(value: unknown, attribute: string, record: M) => this.cellValueModifier(value, attribute, record) .otherwise(() => value)}/> ); } @@ -323,7 +323,7 @@ export default abstract class RecordsPage< return this.recordDialogsStates.get(key)!; } - protected cellValueModifier(value: any, attribute: string, record: M): Match { + protected cellValueModifier(value: unknown, attribute: string, record: M): Match { return match(attribute) .with('createdAt', 'updatedAt', () => dayjs(value as Date).format('DD/MM/YYYY HH:mm')); }