Allow Record<string, string> as input for Translations.T

This commit is contained in:
Pieter Vander Vennet 2023-01-02 02:34:15 +01:00
parent 18399bafb0
commit 03057b2eff

View file

@ -42,7 +42,13 @@ export default class Translations {
*
*/
static T(
t: string | undefined | null | Translation | TypedTranslation<object>,
t:
| string
| Record<string, string>
| undefined
| null
| Translation
| TypedTranslation<object>,
context = undefined
): TypedTranslation<object> {
if (t === undefined || t === null) {