typescript union type instead of enum