As a newcomer to TypeScript, I'm puzzled as to why I am unable to define an object like this:
const obj: {
property1: string
property2: boolean
property3: function
}
It seems that the only workaround is to use:
const obj: {
property1: string
property2: boolean
property3: any
}
Why am I required to specify the function type for property3 right away in the object declaration?