type Lockfile = { lockSync ( path ) : void ; unlockSync ( path ) : void ; } ; let lockFile = null ; /**
 * When lockfile it's required it registers listeners to process
 * Since it's only used by the validator client, require lazily to not pollute
 * beacon_node client context
 */ export function getLockFile ( ) { if ( ! lockFile ) lockFile = require ( "lockfile" ) as Lockfile ; return lockFile ; }