From 4657a403d0faf8e50c596fb7b2450ce56a7220d9 Mon Sep 17 00:00:00 2001 From: Athou Date: Tue, 7 Apr 2026 02:15:12 +0200 Subject: [PATCH] adapt to typescript 6.0 api --- commafeed-client/src/components/ActionButton.tsx | 3 +-- .../src/components/content/add/CategorySelect.tsx | 3 +-- .../src/components/settings/DisplaySettings.tsx | 15 +++++++++++++-- commafeed-client/src/globals.d.ts | 3 +++ commafeed-client/tsconfig.json | 3 +-- 5 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 commafeed-client/src/globals.d.ts diff --git a/commafeed-client/src/components/ActionButton.tsx b/commafeed-client/src/components/ActionButton.tsx index 2f31a283..6a796614 100644 --- a/commafeed-client/src/components/ActionButton.tsx +++ b/commafeed-client/src/components/ActionButton.tsx @@ -1,7 +1,6 @@ import type { MessageDescriptor } from "@lingui/core" import { useLingui } from "@lingui/react" -import { ActionIcon, Box, Button, type ButtonVariant, Tooltip, useMantineTheme } from "@mantine/core" -import type { ActionIconVariant } from "@mantine/core/lib/components/ActionIcon/ActionIcon" +import { ActionIcon, type ActionIconVariant, Box, Button, type ButtonVariant, Tooltip, useMantineTheme } from "@mantine/core" import { forwardRef, type MouseEventHandler, type ReactNode } from "react" import { Constants } from "@/app/constants" import { useActionButton } from "@/hooks/useActionButton" diff --git a/commafeed-client/src/components/content/add/CategorySelect.tsx b/commafeed-client/src/components/content/add/CategorySelect.tsx index 4703e7b7..4f519943 100644 --- a/commafeed-client/src/components/content/add/CategorySelect.tsx +++ b/commafeed-client/src/components/content/add/CategorySelect.tsx @@ -1,7 +1,6 @@ import { msg } from "@lingui/core/macro" import { useLingui } from "@lingui/react" -import { Select, type SelectProps } from "@mantine/core" -import type { ComboboxItem } from "@mantine/core/lib/components/Combobox/Combobox.types" +import { type ComboboxItem, Select, type SelectProps } from "@mantine/core" import { Constants } from "@/app/constants" import { useAppSelector } from "@/app/store" import type { Category } from "@/app/types" diff --git a/commafeed-client/src/components/settings/DisplaySettings.tsx b/commafeed-client/src/components/settings/DisplaySettings.tsx index e9d42219..ff72f402 100644 --- a/commafeed-client/src/components/settings/DisplaySettings.tsx +++ b/commafeed-client/src/components/settings/DisplaySettings.tsx @@ -1,8 +1,19 @@ import { msg } from "@lingui/core/macro" import { useLingui } from "@lingui/react" import { Trans } from "@lingui/react/macro" -import { Box, Divider, Group, NumberInput, Radio, Select, type SelectProps, SimpleGrid, Stack, Switch } from "@mantine/core" -import type { ComboboxData } from "@mantine/core/lib/components/Combobox/Combobox.types" +import { + Box, + type ComboboxData, + Divider, + Group, + NumberInput, + Radio, + Select, + type SelectProps, + SimpleGrid, + Stack, + Switch, +} from "@mantine/core" import type { ReactNode } from "react" import { Constants } from "@/app/constants" import { useAppDispatch, useAppSelector } from "@/app/store" diff --git a/commafeed-client/src/globals.d.ts b/commafeed-client/src/globals.d.ts new file mode 100644 index 00000000..577ef871 --- /dev/null +++ b/commafeed-client/src/globals.d.ts @@ -0,0 +1,3 @@ +// required because of noUncheckedSideEffectImports +// https://www.typescriptlang.org/tsconfig/#noUncheckedSideEffectImports +declare module "@fontsource/open-sans" diff --git a/commafeed-client/tsconfig.json b/commafeed-client/tsconfig.json index 382ac897..986e9531 100644 --- a/commafeed-client/tsconfig.json +++ b/commafeed-client/tsconfig.json @@ -8,12 +8,11 @@ "lib": ["DOM", "DOM.Iterable", "ESNext"], "allowJs": false, "skipLibCheck": true, - "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true,