Based on TypeScript 4.5
globalThis
global
window
Declaration:
declare var var_name: string
Use it:
globalThis.var_nameglobal.var_namewindow.var_namevar_name
process
process.env
declare namespace NodeJS { interface Process { some_key: string } interface ProcessEnv { DATABASE_URL: string }}
process.some_keyprocess.env.DATABASE_URL
import.meta
declare interface ImportMeta { env: { DEV: boolean }}
import.meta.env.DEV