more annotations to god of annotations

This commit is contained in:
2020-10-15 00:26:37 +06:00
parent f44174b5b3
commit f8a8808508
53 changed files with 227 additions and 10 deletions

View File

@@ -1,5 +1,8 @@
package dev.inmo.micro_utils.common
import kotlin.js.JsExport
@JsExport
fun <T> Iterable<T>.syncWith(
other: Iterable<T>,
removed: (List<T>) -> Unit = {},

View File

@@ -5,12 +5,15 @@ import kotlinx.serialization.builtins.ByteArraySerializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kotlin.js.JsExport
typealias ByteArrayAllocator = () -> ByteArray
@JsExport
val ByteArray.asAllocator: ByteArrayAllocator
get() = { this }
@JsExport
object ByteArrayAllocatorSerializer : KSerializer<ByteArrayAllocator> {
private val realSerializer = ByteArraySerializer()
override val descriptor: SerialDescriptor = realSerializer.descriptor