hmlongco / Resolver

Swift Ultralight Dependency Injection / Service Locator framework
MIT License
2.14k stars 188 forks source link

Passing generic parameters #105

Closed AppyMike closed 3 years ago

AppyMike commented 3 years ago

Just wondering how one would pass the generic parameter through injection and if this is possible? For example how would I inject the following class.

class UserService<T> {}

AppyMike commented 3 years ago

register { UserService<User>()} @Injected var userService: UserService<User>

hmlongco commented 3 years ago

That be it.