Given an array of todos with shape { id: number; title: string; completed: boolean }, return a new array containing only the completed ones. This reinforces filtering arrays of objects and returning a new array without mutation.
completedTodos(todos: { id: number; title: string; completed: boolean }[]): { id: number; title: string; completed: boolean }[].completedTodos([{ id: 1, title: 'A', completed: true }, { id: 2, title: 'B', completed: false }]) → [{ id: 1, title: 'A', completed: true }]