typescript union and intersection types