Finance minister Philip Hammond declined to say on Friday if he would quit if Britain leaves the European Union without a deal to smooth its transition.