President Donald Trump signed an executive order on Thursday clearing the way for the completion of a deal to sell TikTok’s US assets to a consortium of mostly American investors.