Skip to content

Commit 9aedf85

Browse files
committedMar 20, 2021
Fix DefaultNamespace conditional type
1 parent 34c87ff commit 9aedf85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎ts4.1/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ type UseTranslationResponse<N extends Namespace> = [TFunction<N>, i18n, boolean]
158158
ready: boolean;
159159
};
160160

161-
type DefaultNamespace<T = 'translation'> = Fallback<string> extends T ? T : string;
161+
type DefaultNamespace<T = 'translation'> = T extends Fallback<string> ? T : string;
162162

163163
export function useTranslation<N extends Namespace = DefaultNamespace>(
164164
ns?: N,

0 commit comments

Comments
 (0)
Please sign in to comment.