In earlier versions 3.44 there was a way to export shapefiles. Is there a corresponding method for the new version 4.27?
3.44
https://developers.arcgis.com/javascript/3/jsapi/extractdata-amd.html
No, not existing. It is also not planned as part of JSAPI (all 3.x esri/dijit/analysis/*)
See Functionality matrix