Taiwan pledged to invest more in the U.S. after President Donald Trump vowed to impose sweeping tariffs on foreign countries.