Donald Trump has declared he will be elected president and is on the verge of victory according to AP which has him on 267 votes, three short of 270.