Created
January 27, 2020 20:14
-
-
Save romainbsl/64658b49b307c59e988125264d07f143 to your computer and use it in GitHub Desktop.
Kodein-DI TypeToken Native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UseExperimental(ExperimentalStdlibApi::class) | |
inline fun <reified T> generic(): TypeToken<T> = NativeKTypeToken(typeOf<T>()) | |
@UseExperimental(ExperimentalStdlibApi::class) | |
inline fun <reified T: Any> TT(obj: KClass<T>) : TypeToken<T> = NativeKTypeToken(typeOf<T>()) | |
@UseExperimental(ExperimentalStdlibApi::class) | |
inline fun <reified T: Any> TTOf(obj: T) : TypeToken<T> = NativeKTypeToken(typeOf<T>()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment