I came over a piece of code in a custom component that I have some trouble understanding.
public onTouch: () => void = () => {}
The onTouch function is set by the private method
registerOnTouch(fn: any) {
this.onTouch = fn;
}
I think that the first part public OnTouch: () = void declares a function without parameters that does not return a value. But I struggle to understand the last part () => ().
What does the latter part describe Could it be an overload?