convert to typescript