Donald Trump has recorded an emphatic defeat of Kamala Harris, racing past the 270 electoral votes he needed with states to spare.