Como passar a função como um adereço opcional no tipo de texto datilografado
interface Props {
type: 'goal' | 'course'
onSaveCourse?: (title: string, date: Date) => void
onSaveGoal?: (text: string) => void
}
Lucifar