mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-25 13:47:39 +02:00
Slightly improve typing
This commit is contained in:
parent
cbedb8e1ca
commit
4e2974b527
@ -11,11 +11,11 @@ interface SanitizeSettingsProps {
|
|||||||
const SanitizeSettings = ({ parameters, onParameterChange, disabled = false }: SanitizeSettingsProps) => {
|
const SanitizeSettings = ({ parameters, onParameterChange, disabled = false }: SanitizeSettingsProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const options = Object.entries(defaultParameters).map(([key, value]) => ({
|
const options = (Object.keys(defaultParameters) as Array<keyof SanitizeParameters>).map((key) => ({
|
||||||
key: key as keyof SanitizeParameters,
|
key: key,
|
||||||
label: t(`sanitize.options.${key}`, key),
|
label: t(`sanitize.options.${key}`, key),
|
||||||
description: t(`sanitize.options.${key}.desc`, `${key} from the PDF`),
|
description: t(`sanitize.options.${key}.desc`, `${key} from the PDF`),
|
||||||
default: value,
|
default: defaultParameters[key],
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user