mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
feat: plan index;flat i18n and add variable value type (#2762)
* feat: plan index * flat i18n and add variable value type * fix: ts * perf: free plan tip
This commit is contained in:
8
packages/web/types/i18next.d.ts
vendored
8
packages/web/types/i18next.d.ts
vendored
@@ -23,14 +23,8 @@ export interface I18nNamespaces {
|
||||
|
||||
export type I18nNsType = (keyof I18nNamespaces)[];
|
||||
|
||||
export type NestedKeyOf<ObjectType extends object> = {
|
||||
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object
|
||||
? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`
|
||||
: `${Key}`;
|
||||
}[keyof ObjectType & (string | number)];
|
||||
|
||||
export type ParseKeys<Ns extends keyof I18nNamespaces = keyof I18nNamespaces> = {
|
||||
[K in Ns]: `${K}:${NestedKeyOf<I18nNamespaces[K]>}`;
|
||||
[K in Ns]: `${K}:${keyof I18nNamespaces[K] & string}`;
|
||||
}[Ns];
|
||||
|
||||
export type I18nKeyFunction = {
|
||||
|
Reference in New Issue
Block a user