import { AnyObject } from "./common_types" ; const $processGlobals = Symbol . for ( "$processGlobals" ) ; if ( ! ( process as any ) [ $processGlobals ] ) { ( process as any ) [ $processGlobals ] = Object . create ( null ) ; } const processGlobals = ( process as any ) [ $processGlobals ] ; export function processGlobal < T extends object = AnyObject > ( name , init ) { if ( ! processGlobals [ name ] ) processGlobals [ name ] = init ( ) ; return processGlobals [ name ] ; }