Comment passer la fonction comme accessoires facultatifs dans le type de typeScript
interface Props {
type: 'goal' | 'course'
onSaveCourse?: (title: string, date: Date) => void
onSaveGoal?: (text: string) => void
}
Lucifar