I have an interface where i define the structure of a callback like so:
interface SliderOptions {
onCreateSlide?: (slide: Slide) => void;
onSlideTransition?: (slide: Slide, offset: number, onTransitionComplete: () => void); // generates typescript compiler error.
// more options etc
}
but i get the follow error, see image below:
Why is this happening i dont get it, since the line right above it doesnt generate this error and does about the same thing imo.

onSlideTransition?: (slide: Slide, offset: number, onTransitionComplete: () => void)=> void;