Exploring TS types, I defined the following:
type type1 = () => {}
type type2 = () => void
Then, I created variables using these types:
const customType1: type1 = () => { }
const customType2: type2 = () => { }
The issue surfaced as
"Type 'void' is not assignable to type '{}'"
for customType1
. But why? Aren't both functions of type "void"?