fix: `unknown` al posto di `any`
This commit is contained in:
parent
70780c573f
commit
1abe8a10c8
|
@ -165,7 +165,7 @@ export default abstract class RecordsPage<
|
||||||
onDeleteRecordButtonClick={this.onDeleteRecordButtonClicked.bind(this)}
|
onDeleteRecordButtonClick={this.onDeleteRecordButtonClicked.bind(this)}
|
||||||
onDeleteSelectedRecordsButtonClick={this.onDeleteSelectedRecordsButtonClicked.bind(this)}
|
onDeleteSelectedRecordsButtonClick={this.onDeleteSelectedRecordsButtonClicked.bind(this)}
|
||||||
readonly={this.readonlyRecords}
|
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)}/>
|
.otherwise(() => value)}/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ export default abstract class RecordsPage<
|
||||||
return this.recordDialogsStates.get(key)!;
|
return this.recordDialogsStates.get(key)!;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected cellValueModifier(value: any, attribute: string, record: M): Match<string, unknown> {
|
protected cellValueModifier(value: unknown, attribute: string, record: M): Match<string, unknown> {
|
||||||
return match(attribute)
|
return match(attribute)
|
||||||
.with('createdAt', 'updatedAt', () => dayjs(value as Date).format('DD/MM/YYYY HH:mm'));
|
.with('createdAt', 'updatedAt', () => dayjs(value as Date).format('DD/MM/YYYY HH:mm'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue