Why can the following code be complied correctly, rather than the compiler raising an error Type \'() => number\' is not assignable to type \'() => void\'.
Type \'() => number\' is not assignable to type \'() => void\'.