Monday, April 8, 2013

Typescript interface implementation gotcha

One thing to note when an interface is implemented in typescript is that for each function only the following are checked:
  • Number of parameters
  • The function return type

Based on this the following is perfectly valid code:

However the following is an error as expected.

You can see a discussion regarding the same :