Type '|1' cannot be used for the '|4' of '|5' in '|3' in this context because both the context and the definition of '|1' ...

Type '|1' cannot be used for the '|4' of '|5' in '|3' in this context because both the context and the definition of '|1' are nested within interface '|2', and '|2' has 'In' or 'Out' type parameters. Consider moving the definition of '|1' outside of '|2'.