mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 23:34:38 +08:00
feat: multi-language support
This commit is contained in:
24
lib/types.ts
24
lib/types.ts
@@ -46,14 +46,22 @@ export type Data = {
|
|||||||
lastBuildDate?: string;
|
lastBuildDate?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Namespace = {
|
interface NamespaceItem {
|
||||||
name: string;
|
name: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
categories?: string[];
|
categories?: string[];
|
||||||
description?: string;
|
description?: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
export type Route = {
|
interface Namespace extends NamespaceItem {
|
||||||
|
ja?: NamespaceItem;
|
||||||
|
zh?: NamespaceItem;
|
||||||
|
'zh-TW'?: NamespaceItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type { Namespace };
|
||||||
|
|
||||||
|
interface RouteItem {
|
||||||
path: string;
|
path: string;
|
||||||
name: string;
|
name: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
@@ -77,4 +85,12 @@ export type Route = {
|
|||||||
source: string[];
|
source: string[];
|
||||||
target?: string;
|
target?: string;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
interface Route extends RouteItem {
|
||||||
|
ja?: NamespaceItem;
|
||||||
|
zh?: NamespaceItem;
|
||||||
|
'zh-TW'?: NamespaceItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type { Route };
|
||||||
|
|||||||
Reference in New Issue
Block a user