how are things being passed to onClick function how are things being passed to onClick function typescript typescript

how are things being passed to onClick function


The component <temp> probably has some code similar to

props.onClick("some-id");

Which in turn will call the onSelected function with id: string = "some-id"