mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-03 07:09:35 +00:00
solution for #105
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
|
||||
* `Common`:
|
||||
* New type `Either`
|
||||
* `Serialization`:
|
||||
* `TypedSerializer`
|
||||
* New factory fun which accept vararg pairs of type and its serializer
|
||||
|
||||
## 0.7.3
|
||||
|
||||
|
@@ -86,3 +86,7 @@ operator fun <T : Any> TypedSerializer<T>.minusAssign(kClass: KClass<T>) {
|
||||
inline fun <reified T : Any> TypedSerializer(
|
||||
presetSerializers: Map<String, KSerializer<out T>> = emptyMap()
|
||||
) = TypedSerializer(T::class, presetSerializers)
|
||||
|
||||
inline fun <reified T : Any> TypedSerializer(
|
||||
vararg presetSerializers: Pair<String, KSerializer<out T>>
|
||||
) = TypedSerializer(presetSerializers.toMap())
|
||||
|
Reference in New Issue
Block a user