migrate to typescript