Hello!
Let's assume I have, sometimes (very rarely), type unsafe calls to the t function.
I would like to know what is the proper way to detect if t('something.invalid') doesn't exist.
I've done it in a way that satisfies me, by directly inspecting my i18n object with Object.keys, and then checking with includes whether the key I'm looking for actually exists, but I'd like to know if this is the right choice?
Hello! Let's assume I have, sometimes (very rarely), type unsafe calls to the
t
function.I would like to know what is the proper way to detect if
t('something.invalid')
doesn't exist.I've done it in a way that satisfies me, by directly inspecting my i18n object with
Object.keys
, and then checking withincludes
whether the key I'm looking for actually exists, but I'd like to know if this is the right choice?Thank you in advance for your answers!