First conversion to typescript.