Exporting a function on typescript “declaration or statement expected” March 12, 2023 by Tarik It seems that let myfunction = something that returns a function export {myfunction}; will do the trick.