From eefd1178dc4b5239632148597b8fd6ae777ece30 Mon Sep 17 00:00:00 2001 From: NTh-Hai Date: Mon, 17 Apr 2023 21:58:08 +0700 Subject: [PATCH] fix s-34 solution screaming Argument of type '[]' is not assignable to parameter of type 'never'. at line 38 --- src/06-challenges/34-internationalization.solution.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/06-challenges/34-internationalization.solution.ts b/src/06-challenges/34-internationalization.solution.ts index b5ba210..334d8b5 100644 --- a/src/06-challenges/34-internationalization.solution.ts +++ b/src/06-challenges/34-internationalization.solution.ts @@ -16,7 +16,9 @@ const translate = < >( translations: TTranslations, key: TKey, - ...args: TDynamicKeys extends string + ...args: [TDynamicKeys] extends [never] + ? [] + : TDynamicKeys extends string ? [dynamicArgs: Record] : [] ) => {