commonMain.org.kodein.di.erasedComp.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kodein-di-js Show documentation
Show all versions of kodein-di-js Show documentation
KODEIN Dependency Injection Core
@file:Suppress("UNCHECKED_CAST")
package org.kodein.di
import org.kodein.type.TypeToken
import org.kodein.type.erasedComp
import org.kodein.type.generic
/**
* Creates a [CompositeTypeToken] that defines a `Set`.
*
* @param T The parameter type of the Set.
*/
public inline fun erasedSet(): TypeToken> = erasedComp(Set::class, generic()) as TypeToken>
/**
* Creates a [CompositeTypeToken] that defines a `List`.
*
* @param T The parameter type of the List.
*/
public inline fun erasedList(): TypeToken> = erasedComp(List::class, generic()) as TypeToken>
/**
* Creates a [CompositeTypeToken] that defines a `Map`.
*
* @param K The key parameter type of the Map.
* @param V The value parameter type of the Map.
*/
public inline fun erasedMap(): TypeToken
© 2015 - 2024 Weber Informatics LLC | Privacy Policy