typescript class conversion partial