Skip to content

Commit

Permalink
fix serverSideTranslations args (#2104)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayone-du authored Mar 2, 2023
1 parent 164f683 commit a3a344d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/serverSideTranslations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ if (process.env.I18NEXT_DEFAULT_CONFIG_PATH) {
DEFAULT_CONFIG_PATH = process.env.I18NEXT_DEFAULT_CONFIG_PATH
}

type ArrayElementOrSelf<T> = T extends Array<infer U> ? U[] : T[]

export const serverSideTranslations = async (
initialLocale: Namespace[number],
namespacesRequired: Namespace[number][] | undefined = undefined,
initialLocale: string,
namespacesRequired:
| ArrayElementOrSelf<Namespace>
| undefined = undefined,
configOverride: UserConfig | null = null,
extraLocales: string[] | false = false
): Promise<SSRConfig> => {
Expand Down

0 comments on commit a3a344d

Please sign in to comment.