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

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com