const fs = ( ( ) => { if ( typeof module === 'object' && typeof module . exports === 'object' && typeof require === 'function' ) { return require ( 'fs' ) ; } } ) ( ) ; const readFile = fs === undefined ? ( ) => { throw new Error ( 'readFile not supported' ) ; } : ( path ) => fs . readFileSync ( path , { encoding : 'utf8' } ) ; interface FS { readFileSync ( path , options ) : string ; } export default readFile ;