I am a newbie in typescript and i need your help.
I have a moduleA
which used a global variable global.LOCALE
on moduleA/src/global.d.ts
, I have declared the locale such as
declare namespace NodeJS { interface Global { LOCALE: boolean; }}
The question is, if I import moduleA
on moduleB
, did I have to redeclare global.LOCALE
on moduleB
?
I am asking this because i received an error when i run tsc
(typescript check (?)) on moduleB
that said Property 'LOCALE' does not exist on type 'Global & typeof globalThis'
even though i didn't use global.LOCALE
at all on moduleB