change to typescript