title: Type checking on second argument of a function based off the first
body: <p>I have a function that registers an Action to a specific trigger in a game. ex:</p>
  
  <pre><code>Triggers.RegisterTriggeredEvent(Trigger.OnPlayerDamage, playerDamageHandler);
  </code></pre>
  
  <p>I want playerDamageHandler to be a specific type ex:</p>
  
  <pre><code>void PlayerDamageHandler(Player damaged, DamageType type);
  </code></pre>
  
  <p>Is there a better way of doing this then run-time type checking of the action based off a Dictionary of key-value pairs ex: [OnPlayerDamage: ActionType]? Is there a way to statically check the type of the function passed to RegisterTrigger? </p>
  
  <p>This can not be done using events because resolution order of triggers depends on the input of players. The triggers are registered in events and then resolved afterward in a specific order decided by the game rules.</p>