When a generic type argument is provided, require the method names array
to only include keys of the generic type argument and for the object
syntax, additionally require that the setup returned type matches the
return type of the method. Requires TS 2.8 for conditional types.