diff --git a/server/utils/source.ts b/server/utils/source.ts index 490584e..3e66bf8 100644 --- a/server/utils/source.ts +++ b/server/utils/source.ts @@ -2,8 +2,10 @@ import type { AllSourceID } from "@shared/types" import defu from "defu" import type { RSSHubOption, RSSHubInfo as RSSHubResponse, SourceGetter, SourceOption } from "#/types" -type X = SourceGetter | Partial> -export function defineSource(source: T): T { +type R = Partial> +export function defineSource(source: SourceGetter): SourceGetter +export function defineSource(source: R): R +export function defineSource(source: SourceGetter | R): SourceGetter | R { return source } diff --git a/src/components/column/index.tsx b/src/components/column/index.tsx index dd57aa0..ba46dc2 100644 --- a/src/components/column/index.tsx +++ b/src/components/column/index.tsx @@ -1,4 +1,4 @@ -import type { ColumnID } from "@shared/types" +import type { FixedColumnID } from "@shared/types" import { useAtom } from "jotai" import { useEffect } from "react" import { useTitle } from "react-use" @@ -7,7 +7,7 @@ import { NavBar } from "../navbar" import { Dnd } from "./dnd" import { currentColumnIDAtom } from "~/atoms" -export function Column({ id }: { id: ColumnID }) { +export function Column({ id }: { id: FixedColumnID }) { const [currentColumnID, setCurrentColumnID] = useAtom(currentColumnIDAtom) useEffect(() => { setCurrentColumnID(id)