Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

376
Views
Namespace 'NodeJS' has no exported member 'Global'

I used to define global variables using the following code:

interface CustomNodeJSGlobal extends NodeJS.Global {
  myGlobalVariable: unknown
}

export { CustomNodeJSGlobal }

In Node 14, but when I installed @types/node (which is currently in the version 16) it throws me an error Namespace 'NodeJS' has no exported member 'Global'. How can I declare global variables in Node 16 and above?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

With Node.js >= 16, I think NodeJS.Global type is no longer available, but you can declare it like:

type NodeJSGlobal = typeof global;
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!