Skip to content

Commit

Permalink
fix i18next.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 committed Jul 17, 2024
1 parent 36f8755 commit 6838789
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions projects/app/src/types/i18next.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,18 @@ export interface I18nNamespaces {

export type I18nNsType = (keyof I18nNamespaces)[];

const defaultNS: I18nNsType = [
'common',
'dataset',
'app',
'file',
'publish',
'workflow',
'user',
'chat'
];
export type I18nCommonKey = keyof I18nNamespaces['common'];
export type I18nDataSetKey = keyof I18nNamespaces['dataset'];
export type I18nAppKey = keyof I18nNamespaces['app'];
export type I18nPublishKey = keyof I18nNamespaces['publish'];
export type I18nWorkflowKey = keyof I18nNamespaces['workflow'];
export type I18nUserKey = keyof I18nNamespaces['user'];
export type I18nChatKey = keyof I18nNamespaces['chat'];

declare module 'i18next' {
interface CustomTypeOptions {
returnNull: false;
defaultNS: defaultNS;
defaultNS: ['common', 'dataset', 'app', 'file', 'publish', 'workflow', 'user', 'chat'];
resources: I18nNamespaces;
}
}

0 comments on commit 6838789

Please sign in to comment.