China has warned it will withdraw from commitments it made on trade if U.S. President Donald Trump carries out a separate threat to impose tariffs on against them.