1

What is <>meaning? if-state and functions uses {}

I can't understand following code... Anyone make it simple so please tell me about that. Is <> possible to be used as an argument?

const AAA = <K,V> => ( keyMapper: (i: KI) => KO, ...inputs: Map<KI, V>[] ): Map<Key, V[]> => {}
Edric
  • 24,639
  • 13
  • 81
  • 91
user2006734
  • 325
  • 5
  • 19

1 Answers1

1

Map is a generic, therefore you specify the types it will use in the angle brackets. Map<number, string> for example, means a map with numeric keys and string values.
You can read more about generics here: https://www.typescriptlang.org/docs/handbook/generics.html

0x777C
  • 993
  • 7
  • 21