From 4f9cd03b36380b1cfc8df28205c24b9cf19ddae7 Mon Sep 17 00:00:00 2001 From: Curetix Date: Wed, 2 Aug 2023 18:00:05 +0200 Subject: [PATCH] docs: add missing type to type-safe translations example --- docs/type-safety.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/type-safety.md b/docs/type-safety.md index 6d4b52a..ea9daf0 100644 --- a/docs/type-safety.md +++ b/docs/type-safety.md @@ -5,6 +5,8 @@ To enable type safety consuming translations, you have to add this to the `next- ```ts import type { Paths, I18n, Translate } from 'next-translate' +type Tail = T extends [unknown, ...infer Rest] ? Rest : never; + export interface TranslationsKeys { // Example with "common" and "home" namespaces in "en" (the default language): common: Paths