Ever wonder if you can declare a function to follow a specific type signature? User function interfaces!
In TypeScript, you can create an interface that describes a function call so that when you assign a function to a variable, you can enforce its type.
a quick intro to function typing in TypeScript • Adding Types To TypeScript Functions