I can’t help much with compile errors if you don’t provide them. Based on a quick search the first one should work just fine. There are numerous functions provided by Epic written exactly that way. Maybe you’re just missing an include or forward declaration or something.
You wouldn’t have the const or & inside the template arguments of TArray. Again you’d either have:
[1/3] Compile AbstractDungeonGameMode.gen.cpp
...\AbstractDungeonGameMode.gen.cpp(30): error C2511: 'void AAbstractDungeonGameMode::GiveObjectOfInterface(const TScriptInterface<IGameEventListener> &)': overloaded member function not found in 'AAbstractDungeonGameMode'
...\AbstractDungeonGameMode.h(14): note: see declaration of 'AAbstractDungeonGameMode'
...\AbstractDungeonGameMode.gen.cpp(33): error C2352: 'UObject::
[1/3] Compile AbstractDungeonGameMode.gen.cpp
...\AbstractDungeonGameMode.gen.cpp(30): error C2511: 'void AAbstractDungeonGameMode::GiveArrayOfInterface(const TArray<TScriptInterface<IGameEventListener>,FDefaultAllocator> &)': overloaded member function not found in 'AAbstractDungeonGameMode'
...\AbstractDungeonGameMode.h(14): note: see declaration of 'AAbstractDungeonGameMode'
...\AbstractDungeonGameMode.gen.cpp(33): error C2352: 'UObject::FindFunctionChecked': a call of a non-static member function requires an object
...\Object.h(1094): note: see declaration of 'UObject::FindFunctionChecked'
I’m pretty sure A & C are only generating compiler errors because they are BlueprintImplementableEvents. Those end up with additional limitations (though not specifically to the TScriptInterface) because of what functionality/features are available in blueprint.
I bet if they were strictly BlueprintCallable and implemented in C++, the signature would compile fine. Though I’m not suggesting that you have to do that. Just making sure that the information is included in this thread for posterity.