function myApp ( ) { import ( "moment" ) . then ( ( moment ) => { const time = moment ( ) . format ( ) ; console . log ( "TypeScript >= 2.4.0 Dynamic Import Expression:" ) ; console . log ( time ) ; } ) . catch ( ( err ) => { console . log ( "Failed to load moment" , err ) ; } ) ; }