* refactor: convert files to ts and improve typings/tests * fix: set return type to unkown for future fix