InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
9.12k stars 721 forks source link

typeOf<reified T>() Kotlin 1.3.40 #484

Closed IVIanuu closed 5 years ago

IVIanuu commented 5 years ago

Kotlin 1.3.40 will introduce a typeOf() function which allows to get the real type of T including generic parameters.

It would be cool if koin makes use of it in some way.

https://youtrack.jetbrains.com/issue/KT-29915

arnaudgiuliani commented 5 years ago

Hi @IVIanuu , effectively very interesting.

A good try should be done, to help the resolution engine and check also performances impact.

drieks commented 5 years ago

We should wait until typeOf is supported by native and javascript. Otherwise, we will introduce more problems for multi platform support / koin 3.0.0 (#524)

arnaudgiuliani commented 5 years ago

sure, and it's heavily reflection oriented ... I'm waiting a clear usecase for that

arnaudgiuliani commented 5 years ago

let's keep it in mind for later 👍