Practice ยท 1 of 3
DTO Validators
Write isTaskDTO(v) โ true only for objects with string id, non-empty string title, boolean done, and optional string due (absent or string). Write isTaskListDTO(v) โ true only for arrays where every element passes isTaskDTO.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Mini Build: Typed API Model