Check out example codes for "typescript function type". It will help you in understanding the concepts better.

Code Example 1

export interface callback {
  handleChange: Function;
  filterFunction: Function;
  setStateFunction: Function;
}

The global type Function serves this purpose.

Additionally, if you intend to invoke this callback with 0 arguments and will ignore its return value, the type () => void matches all functions taking no arguments.

Code Example 2

class Foo {
    save(callback: (n: number) => any) : void {
        callback(42);
    }
}
var foo = new Foo();

var strCallback = (result: string) : void => {
    alert(result);
}
var numCallback = (result: number) : void => {
    alert(result.toString());
}

foo.save(strCallback); // not OK
foo.save(numCallback); // OK

Code Example 3

interface Date {
  toString(): string;
  setTime(time: number): number;
  // ...
}

Code Example 4

function add(x: number, y: number): number {
  return x + y;
}

Learn ReactJs, React Native from akashmittal.com