Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

defined global variable cant be resolved by dependent

$
0
0

I am a newbie in typescript and i need your help.

I have a moduleA which used a global variable global.LOCALEon 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


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>