@pisell/pisellos
Version:
一个可扩展的前端模块化SDK框架,支持插件系统
20 lines (19 loc) • 515 B
TypeScript
export type Locale = 'original' | 'en' | 'zh-CN' | 'zh-HK' | string;
export type MultiLanguage = {
[key in Locale]: string;
};
export interface LibraryItem {
locale: Locale;
name: string;
translations: {
[key: string]: string;
};
[key: string]: any;
}
export interface LocaleConfig {
locale: Locale;
library: {
[key in Locale]: LibraryItem;
};
}
export type LoadLibraryByUrlParams = (string | Promise<LibraryItem> | (() => Promise<LibraryItem>) | LibraryItem)[];