union and intersection types typescript