From c7d4b5ee1ac459f443c1e62a908236e5a8ee250c Mon Sep 17 00:00:00 2001 From: Aleksander Sorokin Date: Sat, 22 May 2021 18:44:03 +0300 Subject: [PATCH] fix(types): add i18n types to gip context --- packages/next/next-server/lib/utils.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/next/next-server/lib/utils.ts b/packages/next/next-server/lib/utils.ts index 6af8e33dbdb7f..36adb6359eb33 100644 --- a/packages/next/next-server/lib/utils.ts +++ b/packages/next/next-server/lib/utils.ts @@ -135,6 +135,18 @@ export interface NextPageContext { * `String` of the actual path including query. */ asPath?: string + /** + * The currently active locale + */ + locale?: string + /** + * All configured locales + */ + locales?: string[] + /** + * The configured default locale + */ + defaultLocale?: string /** * `Component` the tree of the App to use if needing to render separately */