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

Code Example 1

// Default Parameters
sayHello(hello: string = 'hello') {
  console.log(hello);
}

sayHello(); // Prints 'hello'

sayHello('world'); // Prints 'world'

Code Example 2

function sayName({ first, last = 'Smith' }: {first: string; last?: string }): void {
  const name = first + ' ' + last;
  console.log(name);
}

sayName({ first: 'Bob' });

Code Example 3

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.

Learn ReactJs, React Native from akashmittal.com