typescript t extends enum