Closed allanlykkechristensen closed 3 years ago
Agree, I already did it too. It always make sense to reference the enum rather than typing it manually. You'll only need to change it once in the task-status.enum.ts
But for the task status validation pipe you need to declare it manually. There's may be the case that some status cannot be set by the user itself like 'INITIAL' or anything based on your app
Rather than creating extra code for checking if status string is a valid TaskStatus enum, you can use Object.values(TaskStatus). It will also make it easier to maintain the code in the future if you add new enums.