refactor(js): converted file to typescript