Revert "converted code to typescript syntax"

This reverts commit af65f439aed7f97ad80d9f9fa9933a79c7c659a2.