Coming from a C# background, I want to create a datatype that defines a function signature. In C#, this is a delegate declared like this:
delegate
delegate v
In TypeScript, interfaces can have call signatures. In your example, you could declare it like this:
interface Greeter { (message: string): void; } function sayHi(greeter: Greeter) { greeter('Hello!'); } sayHi((msg) => console.log(msg)); // msg is inferred as string