mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 08:13:49 +00:00
solution for #105
This commit is contained in:
parent
8cd0775a6c
commit
67a1050646
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user