diff --git a/src/serverSideTranslations.ts b/src/serverSideTranslations.ts index 2af8f90f..516a013e 100644 --- a/src/serverSideTranslations.ts +++ b/src/serverSideTranslations.ts @@ -8,7 +8,6 @@ import { globalI18n } from './appWithTranslation' import { UserConfig, SSRConfig } from './types' import { getFallbackForLng, unique } from './utils' -import { Namespace } from 'i18next' let DEFAULT_CONFIG_PATH = './next-i18next.config.js' @@ -22,12 +21,11 @@ if (process.env.I18NEXT_DEFAULT_CONFIG_PATH) { DEFAULT_CONFIG_PATH = process.env.I18NEXT_DEFAULT_CONFIG_PATH } -type ArrayElementOrSelf = T extends Array ? U[] : T[] - export const serverSideTranslations = async ( initialLocale: string, namespacesRequired: - | ArrayElementOrSelf + | string + | string[] | undefined = undefined, configOverride: UserConfig | null = null, extraLocales: string[] | false = false