Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default namespace import #2061

Merged
merged 2 commits into from
Dec 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import {
Trans,
withTranslation,
WithTranslation as ReactI18nextWithTranslation,
DefaultNamespace,
Translation,
} from 'react-i18next'
import {
InitOptions,
i18n as I18NextClient,
TFunction as I18NextTFunction,
TypeOptions,
} from 'i18next'
import { appWithTranslation, i18n } from './'

Expand All @@ -20,17 +20,19 @@ import { appWithTranslation, i18n } from './'
* multiple nextjs versions it's safer to inline and keep it up-to-date.
*/
type NextJsI18NConfig = {
defaultLocale: string;
defaultLocale: string
domains?: {
defaultLocale: string;
domain: string;
http?: true;
locales?: string[];
}[];
localeDetection?: false;
locales: string[];
defaultLocale: string
domain: string
http?: true
locales?: string[]
}[]
localeDetection?: false
locales: string[]
}

type DefaultNamespace = TypeOptions['defaultNS']

export type UserConfig = {
i18n: NextJsI18NConfig
localeExtension?: string
Expand Down