Declaring an interface to be used as a type constraint